View Single Post

  #2 (permalink)  
Old 09-06-2004
Steven Stern
 
Posts: n/a
Default Re: session ID question

On 6 Sep 2004 05:03:45 -0700 (more or less), bissatch@yahoo.co.uk (mr_burns)
wrote:

>Hi,
>
>Is there a session ID that exists when you start a session on a PHP
>page? I have noticed that it sometimes is passed in the URL. How do I
>get this session ID even if it doesnt exist in the URL? Cheers
>
>Burnsy


A session is created only if you create one.

To see the contents of a session,

session_start();
print("<pre>");
echo "Session ID: ",session_id(),"\n";
print_r($_SESSION);
print("<pre>");

see http://www.php.net/manual/en/function.session-id.php
Reply With Quote