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

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
TABLE OF CONTENTS:
  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
SEARCH DEVARTICLES

Hey... I Remember You! - Storing the users login details
(Page 2 of 7 )

In our example, we will create a simple three-page site. The first page will be where we add new users. The second where the user signs up, and the third will be the page that they get access to if their login details were validated OK.

To store our login details, we will create a one-tabled database with Enterprise Manager (We could use query analyser, but why complicate it?). So, jump across to your web server and fire up Enterprise Manager (Start -> Programs -> Microsoft SQL Server -> Enterprise Manager). Expand the node of the database server on which you want to create the database (By default, you'll only have one). Right click on the "Databases" node and choose the "New Database..." option. In the name field, enter "smartlogin" and click the OK button at the bottom.

Ok, now to create our table. Under the "Databases" node, you'll find a "smartlogin" node (our newly created database). Expand that node and right click on the "Tables" node. Choose the "New Table..." option. Create the table with the fields shown in the following diagram:

The fields of the SmartLogins table

So, your new table should have three fields: id, user_name and password. To reduce the chance of data duplication, we will create our "id" field as a special field called a "unique identity". Pay close attention to the options of our Id field above: Notice how the Identity field is set to "yes" and both the identity seed and increment fields are 1. This basically means "the id field will be a unique field that will start with the value of 1. Every time a new record is added, its value will be one more than the previous record".

Close the window and save the table as "logins". Now that we've got all of the database design our of the way, we're ready to create the page that will allow us to add users to our logins table.
blog comments powered by Disqus
ASP ARTICLES

- 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 
Support 

Developer Shed Affiliates

 




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