Hello;
I have a script setup which uses sessions to store user information. But I also need to be able to set a variable that says whether a user is currently online or not. At the moment, when a user logs on, I set session variables, and also set a bit in my data base to 'online', and when the user logs out, the sessions are destroyed and the bit is the database is set to 'offline'. This works great if the user actually loggs out with the 'logout' function, but, obviously, it wont work if the user simply shuts down the browser. Is there a better way to set-up an indication of when a user is online? Or, is there a way to have the script set the database bit to the 'offline' condition if the browser disconnects?
Thanks;
Ice