title: How to see if a user is online in a website with php and mysql driven databases?
body: <p>I'm building a community website. Users will login and logout as usually. </p>
  
  <p>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?</p>
  
  <p>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. </p>
  
  <p>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.</p>