Re: Re[3]: [PHP] sessions help
| From: | Leston Drake | Date: | Thu, 13 Jun 2002 22:18:34 +0000 |
| Subject: | Re: Re[3]: [PHP] sessions help | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102090@lists.php.net to get a copy of this message | ||
Yeah, I thought of that too. Same result, though.
At 04:16 PM 6/13/2002, you wrote:
Hmm. Okay. Replace $_SESSION with $HTTP_SESSION_VARS and see if that works. -Kevin ----- Original Message ----- From: "Leston Drake" <ldrake@lpsoftware.com> To: <php-general@lists.php.net> Sent: Thursday, June 13, 2002 4:07 PM Subject: Re[3]: [PHP] sessions help 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 sessioncontains. It is: Array()thenif (!empty($_SESSION)) {Why are you doing this? If you're accessing the session through $_sESSIONextract($_SESSION);} else if (!empty($HTTP_SESSION_VARS)) {extract($HTTP_SESSION_VARS);}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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php