Home Tutorial Php Examples Session regenerated id


Share on Google+Share on Google+
Session regenerated id
Posted on: July 31, 2009 at 12:00 AM
This is the example of session regenerated id in PHP.

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.

echo "<br />";
$oldsessionid = session_id();
echo "Old Session:". $oldsessionid."<br />";

$newsessionid = session_id();
echo "New Session:". $newsessionid."<br />";



Related Tags for Session regenerated id:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 31, 2009

Recommend the tutorial

Advertisements Advertisements