faqts : Computers : Programming : Languages : Asp : ASP/VBScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 24 people (38%) answered Yes
Recently 5 of 10 people (50%) answered Yes


How I can make my login system so just 1 person can use a login and password at a same time ??

Jul 21st, 2004 04:26
Craig Newbury, Hq Hq,

I shall assume that you are using a database to store usernames, and 
passwords in (encrypted i hope). Just add another colum to the 
database table. Edit your login asp script to set a value in the new 
colum for the record of the person loggin in, so that you know when 
they are logged in. Also put in the login script something that will 
check if they are logged in before it actult logs them in.
If the user dosent log out then the user wont be able to log in  again 
as the "logged-in" record hasnt been updated. To fix this you could 
use the global.asa event "SUB Session_OnEnd" to update the database 
recod to day that they are not logged in.
You can do this without a database, but its easier to keep a list of 
users in a DB, instead of hand coded into a script.
This should be fairly easy to do. Hope that helps!!

© 1999-2004 Synop Pty Ltd