Hi...
I am working on something and I want to know if it's possible to log someone out when they close their browser?? Also, can you run a query that logs them out if their session times out?
I have it set up right now where when a user navigates to another page after the session has timed out, they get logged out.:
$query2 = "UPDATE users SET online = 'n' WHERE username = '$user'";
$result2 = mysql_query($query2);
session_destroy();
Is there away to do it when they aren't navigating or they close a window. Thank you for your help....