In my opinion, one of the most annoying things about some websites is logging in. Today, Mitchell will demonstrate how to create a nifty little feature that will allow your site to "remember" its visitors.
Hey... I Remember You! - The "remember me" part (Page 6 of 7 )
We can now create new user accounts and they can login. They can also choose to be remembered by checking the “Remember Me” box, which sets two cookies: u (username) and p (password).
To complete our project, we will have to make a couple of modifications to the login.asp script. The code below will automatically fill out the login form with the cookies of the users username and password. If there is no cookie, the username and password fields will take the default value of “” (empty). The “Remember Me” checkbox will also be selected:
28. <input type="checkbox" name="remember" value="ON" checked> Remember Me
To test our application, fire up the adduser.asp page in your browser and create a new user with username “test” and password “go”. Jump to login.asp, enter the username “test” and password “go” and make sure the “Remember Me” checkbox is selected. Click the “Login Now” button.
Next, close the web browser. Re-Open it and goto login.asp. Notice your username and password fields are automatically filled in! To get rid of them, click on the “Login Now” button with the “Remember Me” checkbox not selected.