You don't have any way of telling if the user switched. You just receive a request for a web page and the browser sends any cookies it has.
If the user even decides to log in as themselves, you can see if a cookie/session was sent and delete that cookie/session before you let the other person log in. ---John Holmes... > -----Original Message----- > From: César Aracena [mailto:[EMAIL PROTECTED]] > Sent: Saturday, June 29, 2002 2:11 AM > To: 'PHP General List' > Subject: RE: [PHP] SESSION's from common computers > > Got it but... What happens if someone else grabs the computer that my > user was sitting at 2 minutes before, leaving the window opened and > after he grabs the new machine open a new session... isn't PHP capable > of determining that the same user is trying to open a 2nd session no > matter what the cookie tells it? I mean by his username. > > C. > > > -----Original Message----- > > From: John Holmes [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, June 29, 2002 2:36 AM > > To: 'César Aracena'; 'PHP General List' > > Subject: RE: [PHP] SESSION's from common computers > > > > You really can't do anything besides saying that after X minutes, > well, > > you were idle, so restart your session. Once you send them the page, > you > > don't know if they are reading it or have left the table. All you can > do > > is decide on the next request whether too much time has passed. > > > > As for the new computer, they'll have to start a new session there > > automatically, because they won't have the same cookie matching the > > session ID from the first computer. > > > > ---John Holmes... > > > > > -----Original Message----- > > > From: César Aracena [mailto:[EMAIL PROTECTED]] > > > Sent: Saturday, June 29, 2002 1:24 AM > > > To: PHP General List > > > Subject: [PHP] SESSION's from common computers > > > > > > Hi all. > > > > > > I have a question about sessions… which is the best way to close a > > > session if one it’s opened for a certain user and then this user > > changes > > > to another computer? I guess that I could manage with > > session_start_time > > > and session_end_time fields in the DB, and tell the script to see if > > the > > > opened session hasn’t been closed… then close it and open a new one. > > > > > > Does this make any sense? Is there a better way to do this? I want > to > > > know this because many users actually use cyber-coffees computers to > > > access web sites and I’ve seen them leaving their chair with the > > windows > > > still opened and changing to another pc. > > > > > > Thanks in advance, > > > > > > <mailto:[EMAIL PROTECTED]> Cesar Aracena > > > CE / MCSE+I > > > Neuquen, Argentina > > > +54.299.6356688 > > > +54.299.4466621 > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php