From: "Todd Cary" <[EMAIL PROTECTED]>
> I am trying to understand sessions are done with php. My "learning
> script" has the following:
>
> session_start();
> if (isset($_SESSION['firstname'])) {
> $_SESSION['firstname'] = 'Todd';
> } else {
> $_SESSION['firstname'] = 'Nobody';
> }
>
> echo "SESSION: " . $_SESSION['firstname'] . "<br>";
> echo 'SID: ' . SID . '<br>';
> echo '<br /><a href="page_2.php?' . SID . '">page 2</a>';
>
> SID is always empty. What have I missed?
Session IDs are normally carried in cookies. If the cookie was set
successfully, then SID is not set because it's not needed. Turn off cookies
and try this code.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php