lolwut
06-12-2007, 08:12 PM
Righty ho,
Well I have this usersystem, and when they login it sets the correct row in the database so that "logged_in" is equal to 1.
But it only changes to 0 when they press Logout.
Is there any way to make it set to 0 when they're inactive for 1/2 hour?
'cause I can't figure it out.
I tryed to log the time of their last action and compare it with the current time, but that failed because when they closed the tab or window it wasn't able to refresh to time them out, hence a failure there.
Any help appreciated and +repped.
Well I have this usersystem, and when they login it sets the correct row in the database so that "logged_in" is equal to 1.
But it only changes to 0 when they press Logout.
Is there any way to make it set to 0 when they're inactive for 1/2 hour?
'cause I can't figure it out.
I tryed to log the time of their last action and compare it with the current time, but that failed because when they closed the tab or window it wasn't able to refresh to time them out, hence a failure there.
Any help appreciated and +repped.