PHP - I need to update the database whenever a user's loggedIn session

xxxjj18

New member
expires, but don't know how!? Okay, so I have a site(altairiarpg.com) and in the forums(coded from scratch, so no this problem isn't already taken care of), it shows the users who are logged in. Now, when a user logs in, in the database in their profile the 'loggedin' is set to 1, and that's how the forums check to see if the user is logged in. But the problem is unless the user manually clicks the log out button, it will continue to say that they are logged in even after their session expires... Is there a way to have the server 'log them out' for me? Even if it meant running a webpage that updates itself to do so... Or is there another, easier method to do this?

I was thinking about using javascript to detect when the browser closes and then redirect to the logout page but not every body has javascript enabled, and so on..... Please help :) I will provide more details if needed. Thanks :)
 
Back
Top