i'm making a site blog for my site and i want to use sessions, probem is, i have a question if a user is on a page but stays on it for an hour i want the session to do something, i dont want him to be logged out completely but i want him to be logged out after hes inactive after a long time, but i want him to appear as logged off, to others if he is inactive for 5 mins or more. can someone tell me how i'd do this with php and mysql?
Ok, i know that but lets say i was on this forum for like 5 hours inactive, would i be logged out?, would i appear offline but still be logged on? would i remain logged on forever like till next week, or would it log me out tommorow, would i appear offline till next week, all these questions confuse me.
For a site i have built the user isnt allowed to stay logged in for more than 1 hour then they must relogin. So on every click it checks the session and checks the current time then works out how far long its been. If:
No, you all dont understand, i dont want users to sign in every few seconds but i dont want them to leave and then come back to find themselves still logged in cause the session never expired. Yet i dont want a user to go out for an hour come back and find that they've been logged out.