Re[3]: [PHP] sessions help
| From: | Stuart Dallas | Date: | Thu, 13 Jun 2002 21:49:47 +0000 |
| Subject: | Re[3]: [PHP] sessions help | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102081@lists.php.net to get a copy of this message | ||
On Thursday, June 13, 2002 at 10:32:25 PM, you wrote:
> Thanks to Julie and Stuart for helping me.
> With your direction, I got rid of the warning about the headers by putting
> the session_start() at the beginning of the file.
> Now I get a different sort of error when I try to retrive the session variable:
> -------------------------------
> Warning: Undefined index: node in c:\program files\apache
> group\apache\htdocs\wan\getglobal.php on line 17
> -------------------------------
Do a print_r($_SESSION); in getglobal.php to see what the session contains.
> 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.
--
Stuart