- PHP

How to get PHP Session ID

To get the PHP session ID, use the session_id() function.

<?php

echo session_id();

?>

Example:

<?php

session_start();    

echo '<b>PHP Session ID:</b> ' . session_id();

?>