Gets/sets the session ID.
This function returns the session ID created with session_start(). It can also be used to change the session ID.
<?php
session_id("mySessionID");
session_start();
print "My session ID is: " . session_id();
session_destroy();
?>My session ID is: mySessionIDThe example shows how session_id() can be used to set the ID for the session.