I'm building a community website. Users will login and logout as usually.
I use the attribute status online/offline to set the user's status. But what if a user just clicks the X button or disconnects otherwise without logging out?
Lately my computer crashed, when I opened the site with my laptop I could not login because I don't allow login in two places. I go to PHPMyAdmin and I see my status still online. Is there any fix for this.
I tried the last_time activitiy thing but that doesn't work in case of a computer crash! And there was nothing neither interactivity or refresh to update the table.
Well the real answer for ur question "How will i update the table without user interaction ?"
is MySql event scheduler , you schedule a an event (query) to be executed at whenever you wish even if the user is OFFLINE , read about it here (http://dev.mysql.com/doc/refman/5.1/en/events-overview.html)