session ID question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mr_burns

    session ID question

    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
  • Steven Stern

    #2
    Re: session ID question

    On 6 Sep 2004 05:03:45 -0700 (more or less), bissatch@yahoo. co.uk (mr_burns)
    wrote:
    [color=blue]
    >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[/color]

    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($_SESSI ON);
    print("<pre>");

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

    Comment

    Working...