Re: Login and Sessions

From: Date: Wed, 23 Apr 2003 06:50:00 +0000
Subject: Re: Login and Sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144960@lists.php.net to get a copy of this message
No, sessions aren't going to be the answer here. You're best bet it to use a database to store some boolean for where the user is actively logged in or not. Then when they try to login you'd have to query the appropriate table to determine then if you wanted to continue on to test the authentication mechanism. -- der Ritter aka: Jason k Larson C.R. wrote:
I have a login script which uses sessions and want to implement something that would allow a user to only log in once (this could be depending on IP or user name - I haven't decided how I want to go yet). I would appreciate any feed back on how this could be accomplished. I would like to use the session that is already set for a particular user, but not sure how to do this. If I have 100 users logged in and one of them tries to log in again - how would I check this against the sessions already set? This is assuming the user opens a new browser to log in again. If he tries to log in from the same session, then this is already covered. TIA


« previous php.general (#144960) next »