I have made a login screen (it's local) so people need a username and password to use it. it is all working but except for the fact that people can just open a new tab, i would like it so when they try and browse without a username and password it asks them to login before continuing.
Any help Appreciated.
01-07-2010, 04:07 AM
In which language is it? If it's in PHP, for example, you need to create a session using session_start(). When the user has logged in, you add a session variable with their username or a logged_in flag or something and then check that at the start of each page. If it exists, they're logged in and all is well, otherwise redirect them to the login page.
01-07-2010, 04:12 AM
on the website you gave me, i did not see anything to stop people from accesing the internet without loging in through the local file, i have thought about cookies for telling the user they are logged in when they press home though.
01-08-2010, 07:05 AM