Hi, The idea is to add some kinda ping to your web site with Ajax so as far as you receive pings you know that the use kept his/her browser open and when it stops sending pings either the browser is closed or the net connection is down, and then delete the user session and try to log it out. and for preventing multiple logins you can make a database and track users, when a user logs in you put a record with username and/or userid in that database and when a user tries to login again just check if there is an old record with the same username/userid. but don't forget to delete this record when user logs out! or the session ends. have a good coding Erfan Shirazi wrote: > > Hi all > > > I have a problem which I need some help with. > I have a e-commerce site were the user must log in in order to use some > of the functions. But I only want 1 active session for each user, so the > user should not be able to have 2 browsers opened and being able to log > in with both. > > > So I need to somehow know the difference between when a user has just > shutdown the browser without correct login and when the user has logged > out correctly. > > Today we use DB in order to make this happen but then the user is able > to login twice but as soon as he clicks on something (new PHP call) in > the previous session he gets kicked out from his previous session. > > I want to somehow see if the user already has a browser opened with a > active session and tell him to use that one instead. And if the browser > is closed but he has not logged out correctly then he should be able to > log in again. > > > > Best Regards, > > /Erfan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- View this message in context: http://www.nabble.com/Multiple-session-tf4157960.html#a11837017 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php