Lithium Posted February 11, 2009 Posted February 11, 2009 session_start(); $x = session_id(); if (!empty($_SESSION)) { session_regenerate_id(TRUE); $y = session_id(); session_id($x); session_destroy(); $x = $_SESSION; session_id($y); session_start(); $_SESSION = $x; } this works, as it creates a new session, though, when hitting back browser button it would make a call to a session_id that no longer exists, yet it remains as it was there... so definetly, i am doing something bad, though i don't know where! Quote
Lithium Posted February 11, 2009 Author Posted February 11, 2009 Re: Can someone point me what i am doing wrong here? regenerate session id on every page load, and destroy the previously one used. it does it, though let's say i go back on the browser by a page or two... wasn't it suppose to deny me, as i am calling a sid that no longer exists? Quote
Decepti0n Posted February 11, 2009 Posted February 11, 2009 Re: Can someone point me what i am doing wrong here? http://php.net/session_regenerate_id Quote
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.