PHP Terms Session SID Set

 

- Info:

- If you call session_id() with optional input parameter current SID will be replaced with that value.

 

- Example:

- Create PHP Console Application Test.php.

 

Test.html

<?php

//ENABLE SESSION.

session_start();

//SET CUSTOM SID.

session_id("Custom12345");

 

//GET SID.

echo "SID = " . session_id();

?>

 

output

SID = Custom12345