Session regenerated ID
session_regenerate_id() works to regenerate the session by replacing oldsessionid.
For this, first start the session,
set the sessionid equal to oldsessionid and print oldsessionid.
Now use the session_regenrateid and set this id to new sessionid.
<?php
session_start();
print_r($_SESSION);
echo "<br />";
$oldsessionid = session_id();
echo "Old Session:". $oldsessionid."<br />";
session_regenerate_id();
$newsessionid = session_id();
echo "New Session:". $newsessionid."<br />";
?>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.