I am designing a site where paying users can login to a searchable scientific database. But I only want them to be able to be logged in on one computer at a time. If a user clicks the logout button, I set a field in my table to LoggedIn = False. But what if they just close the browser? Then the database still thinks they're logged in. Is there a way for sessions to accomplish this task?
you can set the session expire time in the php.ini file or
fire a javacript event to log out the user from the <body onUnLoad="somescript();">
to submit a little something to close the session.
hth
bastien
Can't you use a cookie set to expire after a certain amount of time?
Yes. You can use Cookies. setcookie("cookies",$id, time()+3600);
This will expire in 1 hour. Check out www.php.net/ and type in Setcookie it will tell ya how to do it all. Lata. Chad