I'm using PHP&MySQL
So when user login, time is recorded in DB.
When he push log out button, time is recorded in DB.
When he turns off his computer, or close browser, logout field holds NULL value (Log out NOT pushed).
How to fight that issue?
PeeJavery told me that it can be solved through Ajax only.