Page 1 of 1

Reset a Session ID.

Posted: Thu Feb 26, 2004 4:58 pm
by hawleyjr
I am trying to reset a session id. My thoughts were to do the following:

Code: Select all

session_unset();
	session_start();
	echo session_id().'-->1<BR>';

	session_unset();
	session_start();
	echo session_id().'-->2<BR>';
	
	session_unset();
	session_start();
	echo session_id().'-->3<BR>';
However, the output looks like this:

Code: Select all

49b4d982aefe4a291e5a9d0815987a0c--&gt;1
49b4d982aefe4a291e5a9d0815987a0c--&gt;2
49b4d982aefe4a291e5a9d0815987a0c--&gt;3
?&gt;
I am more or less just tinkering around; but if anyone else has successfully reset the session id without forcing the user to close the browser. I'd be interested to see how.

Posted: Thu Feb 26, 2004 5:41 pm
by Weirdan
[php_man]session_regenerate_id[/php_man]()