On Thursday, June 13, 2002 at 11:07:16 PM, you wrote:

> 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()

How are you getting from one page to the other? Are you clicking on a link in
the first page or are you typing the second URL into the browser? The only
thing I can think is that the session id is not being passed from the first
page to the second page. This would cause the session to be empty on the
second page because it will have created a new session rather than having
imported the session the first page created. (I hope that made sense)

>>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?

No. If you use $_GET, $_POST and $_SESSION to get to those variables then there
is no need to extract them into the global scope.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to