Re: Login and Sessions
| From: | Jean-Christian Imbeault | Date: | Wed, 23 Apr 2003 04:44:25 +0000 |
| Subject: | Re: Login and Sessions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144955@lists.php.net to get a copy of this message | ||
C.R. wrote:
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?Just my opinion but I odn't think checking sessions is the way to go. I assume that you are keeping user names and passwords in a database? If so just add a "is_logged_in" field to your users table. That way when someone tries to log in a second time you can tell that he is already logged in. Now the tricky part is if you want to *allow* a user to log in again *and* have session data that you want to carry over to the new log in ... To do that I think (just my guess) that you would have to write your own session handler that writes the session info to a database and then you can easily carry session info over from one log in to another. HTH, Jean-Christian Imbeault