Baez Posted April 23, 2010 Share Posted April 23, 2010 After using ignore_user_abort() and the connection is closed by the client, it's impossible to retrieve values from sessions right? If that is the case is there another way to store the session information before the connection is closed so it's still usable after? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/199542-quick-session-question/ Share on other sites More sharing options...
mikesta707 Posted April 23, 2010 Share Posted April 23, 2010 Why not just use cookies? Quote Link to comment https://forums.phpfreaks.com/topic/199542-quick-session-question/#findComment-1047363 Share on other sites More sharing options...
Baez Posted April 23, 2010 Author Share Posted April 23, 2010 Cookies rely on the client's browser being open like sessions. This is after the client has closed the page and the remainder of the script runs. Quote Link to comment https://forums.phpfreaks.com/topic/199542-quick-session-question/#findComment-1047367 Share on other sites More sharing options...
mikesta707 Posted April 23, 2010 Share Posted April 23, 2010 ahh yes, I see. Well why not store the session array into a variable in your script, like $sessions = $_SESSION; that way you can use $sessions instead Quote Link to comment https://forums.phpfreaks.com/topic/199542-quick-session-question/#findComment-1047369 Share on other sites More sharing options...
Baez Posted April 23, 2010 Author Share Posted April 23, 2010 Yes I've thought of that. However the page will be continuously refreshing every 15 seconds. So my thinking was that if the client closes the page during the refresh, the session data would be lost along with the secondary $sessions array, leaving no data. Is there a way to prevent that, or a certain placement of $sessions = $_SESSION that will stop data loss from happening? Quote Link to comment https://forums.phpfreaks.com/topic/199542-quick-session-question/#findComment-1047379 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.