Re: State...

From: Date: Fri, 07 Jul 2000 03:16:36 +0000
Subject: Re: State...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5307@lists.php.net to get a copy of this message
Here's my session flow: 1. User enters name & password on form, clicks submit 2. name and password are concatenated, then that string is converted to md5 hash 3. The password field is replaced with the newly created hash 3. The hash and name are sent back to the server, where they're compared with an md5 of the user name and password from the database 4. If authenticated, a new hash is constructed using the name and timestamp 5. the name, timestamp, hash, and a few other trinkets are stored in a session table 6. The new hash is passed from page to page to track the user Each time the user hits a new page, the timestamp field for that user is pulled from the table, and if it's more than 20 minutes old, that record is removed and the user must login. If it's less than 20 minutes, a new timestamp is inserted. I don't know how efficient this is, but it has been working well thus far. ----- Original Message ----- From: "CZ" <czelenak@nxco.com> To: <php-general@lists.php.net> Sent: Thursday, July 06, 2000 8:37 PM Subject: [PHP] State... > Hey all. > > Was wondering if someone might fill me in on methods one might use to > determine a user's current "state" using sessions ; logged in, logged out > due to expiration, logged out due to browser close, logged out due to user > action ( last one is the easy one ; no need for help in that regard ). > > Thanks for any suggestions. > > CZ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#5307) next »