I'm having a problem, I'm doing a system in php and should show how many users are online and how many are offline.
so I did a column "online type int" 0 = offline, 1 = online.
when the user logs into the system switches to 1, and when you click logout switches to 0, the problem is as the user closes the tab or turn off your computer, you can not change to 0.
how you can do that?