Page 1 of 1
Variables from URLs? Or at least a way to...
Posted: Wed Nov 21, 2007 3:22 pm
by Mightywayne
Howdy! Glad to see DevNet is running well on its new server.
Anyway, I'm having a bit of trouble with something. People will be logged in to my game, and then AFK for like 20 minutes, and come back and they are disconnected. I was wondering if there was a way to just *implement* a way to return them to the page they were previously on when they log back in.
Posted: Wed Nov 21, 2007 3:33 pm
by Christopher
Well ... you need to store the last page somewhere. In a cookie would probably be best or a database record associated with the user account.
Posted: Wed Nov 21, 2007 3:37 pm
by s.dot
You could also go about increasing the session.gc_max_lifetime
Posted: Wed Nov 21, 2007 3:52 pm
by Mightywayne
arborint wrote:Well ... you need to store the last page somewhere. In a cookie would probably be best or a database record associated with the user account.
In a... cookie...? So that means every page, I'd have to set a cookie. Is that hard on the server or anything?
Edit: Oi, and then, I'd have to set it up on every single file I have, manually, huh? Not too worried, just asking.
Posted: Wed Nov 21, 2007 4:36 pm
by RobertGonzalez
This is one of those arguments for databases session handling as opposed to native sessions. You could always use both. Since you know who they are when they log in, and since you are setting sessions details on every page, you may as well capture what page they are on for every request. The last known page can then be easily fetched when they log back in.
Posted: Wed Nov 21, 2007 5:07 pm
by Mightywayne
Alright, thanks.