Re[3]: [PHP] sessions help

From: Date: Thu, 13 Jun 2002 22:07:16 +0000
Subject: Re[3]: [PHP] sessions help
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-102087@lists.php.net to get a copy of this message
I've stripped the code down to barest bones to try to figure this out: [getglobal.php] ... echo "Node is {$_SESSION['node']}."; ... [session.php] ... $_SESSION['node'] = "10.2"; ... Other than the standard html, head, title, body tags and the session_start(), there is no other code. I'm still getting the "...Undefined index: node ..." warning.
Do a print_r($_SESSION); in getglobal.php to see what the session contains.
It is: Array()
if (!empty($_SESSION)) {
       extract($_SESSION);
} else if (!empty($HTTP_SESSION_VARS)) {
       extract($HTTP_SESSION_VARS);
} Why are you doing this? If you're accessing the session through $_sESSION then there's no need to extract the session into the global scope.
With register_globals=Off, I understand that you need to extract the $_POST and $_GET vars. I assumed the same for $_SESSIONS. Is this not true? TIA, Leston

« previous php.general (#102087) next »