Re: no session id
| From: | Ernest E Vogelsinger | Date: | Wed, 26 Feb 2003 08:28:00 +0000 |
| Subject: | Re: no session id | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137200@lists.php.net to get a copy of this message | ||
At 01:39 26.02.2003, php said:
--------------------[snip]--------------------
>this code doesn't ouput a session-id.
>is the code right? and if not, any suggestions what's wrong?
>i'm new into sessions, so forgive me for stupid questions..
>thanx
>michiel
>
><?
>session_start ();
>Header("Content-Type: text/html");
>echo "session id: " . $session_id;
>?>
--------------------[snip]--------------------
The session ID is not contained in a global variable, but you can retrieve
it using the session_id() function:
echo "session id: " . session_id();
For more information on session related functions refer to
http://www.php.net/manual/en/ref.session.php
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/