Hey guys,
i'm working on a portal, everything works fine (messaging, friends and more features) but it has an big problem.
I have a table "users", where the id, username, password, email and the login status is stored. When the user signs in, the login status will be set on 1. When the user signs out, the login status is going to be 0. But how to manage it when the user don't click on logout?
I have the problem, that the most users on this portal just close the browser...
And here is my question: How to update sql when the session expires? Is there any script?
maybe like this:
- check if session is expired
- if session is expired then
- update sql login_status to zero
thanks for your help!
greetings
mario