PHP/Cookie Session/session id
function session_id() returns the user"s SID originally created by session_start().
This is its syntax: string session_id([string sid])
<?
session_start ();
print "Your session identification number is ".session_id();
session_destroy();
?>
session_id() function
<?php
session_start ();
echo "Your session identification number is ".session_id();
?>
Starting or Resuming a Session
<?php
session_start();
?>
<html>
<head>
<title>Starting or Resuming a Session</title>
</head>
<body>
<?php
print "<p>Welcome, your session ID is ".session_id()."</p>\n\n";
?>
</body>
</html>