title: setting value if user exits website
body: <p>heres a issue i have. When a user logs in on the website, it sets a value to indicate they are offline. If they logout through the website, the value is set to indicate the user is offline.</p>
  
  <p>But if the user just closes the website without pressing logout, it still indicates they are online.</p>
  
  <p>How can i make it so it makes them offline once they have closed the website.</p>
  
  <p>my website is using php, html, css and mysql.</p>