title: User still online after closing page
body: <p>I'm working with a php login script. (and i have a stupid beginner question) The plan is to log off users with a cookie after 1 hour.</p>
  
  <p>But if the user didn't press the logout button the user stayed online (on my database table there keeps a record open on my MySQL db) When I deleted that record everything goes fine and the user can login.</p>
  
  <p>Could somebody help me out?
  Do i need to let he script delete my session or something else?</p>
  
  <p><strong>Solution:</strong> the problem was that i just needed to delete (make sure) that the user login data was deleted before the users wants to login again. So i made a small script that deletes a open session for the user if he want to login. After all i stopped using my own code. Now i am using CodeIgniter and it works good!</p>