session_regenerate_id
Update the current session id with a newly generated one
&reftitle.description;
boolsession_regenerate_id
booldelete_old_sessionfalse
session_regenerate_id will replace the current
session id with a new one, and keep the current session information.
&reftitle.parameters;
delete_old_session
Whether to delete the old associated session file or not.
&reftitle.returnvalues;
&return.success;
&reftitle.changelog;
&Version;
&Description;
4.3.3
Since then, if session cookies are enabled, use of
session_regenerate_id will also submit a new
session cookie with the new session id.
5.1.0
Added the delete_old_session parameter.
&reftitle.examples;
A session_regenerate_id example
";
echo "New Session: $new_sessionid
";
print_r($_SESSION);
?>
]]>
&reftitle.seealso;
session_id
session_start
session_name