PDA

View Full Version : id and password protection on mysite


tommy
08-25-2003, 04:56 PM
How do you make a website with a login box, so when you log in you get access to more stuff, I know asp, but not sure how to go about doing this.

Do I have to create a database or something? And i dont want users to be able to book mark the page once they have entered the correct password, I want them to re-enter their ID and Password if they want to get to their bookmarked page.

-Tom

cbkihong
08-25-2003, 05:35 PM
What I usually do is to encrypt (username, password) pair with a key secret to the server program. The result is then set as browser cookie for limited duration. It is then decrypted and checked by my site on every page visit. When the cookie expires or deleted otherwise, the user has to log on again.

Another way is to store session information on the server. Once a user logs on successfully, a session id is assigned and carried in all subsequent URLs. The IP and time/date is stored. The session ID can expire at any time you want to, then the user has to log on again.