Home arrow ASP arrow Page 6 - Hey... I Remember You!

Hey... I Remember You!

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.

Author Info:
By: Mitchell Harper
Rating: 5 stars5 stars5 stars5 stars5 stars / 45
November 15, 2001
  1. · Hey... I Remember You!
  2. · Storing the users login details
  3. · Adding new users
  4. · Creating the login page
  5. · The CheckLogin routine
  6. · The "remember me" part
  7. · Conclusion

print this article

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:

26. Username: <input type="text" name="uname" maxlength="20" value="<%=Request.Cookies("u")%>">

27. Password: <input type="password" name="pass" maxlength="20" value="<%=Request.Cookies("p")%>">

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.

The process of adding a new user, logging in and r
blog comments powered by Disqus

- Central Scoreboard with Flash and ASP
- Calorie Counter Using WAP and ASP
- Creating PGP-Encrypted E-Mails Using ASP
- Be My Guest in ASP
- Session Replacement in ASP
- Securing ASP Data Access Credentials Using t...
- The Not So Ordinary Address Book
- Adding and Displaying Data Easily via ASP an...
- Sending Email From a Form in ASP
- Adding Member Services in ASP
- Removing Unconfirmed Members
- Trapping HTTP 500.100 - Internal Server Error
- So Many Rows, So Little Time! - Case Study
- XDO: An XML Engine Class for Classic ASP
- Credit Card Fraud Prevention Using ASP and C...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials