At 03:32 PM 6/13/2002, 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 >------------------------------- > >Any ideas why? > >(Here's the exact code I've got)
This is the code, w/o formatting, and w/o the html tags. Sorry about the formatting in the email >[sessions.php] ><?php session_start();?> ><?php function sessionSetNode ($node_id) { return ($_SESSION['node'] = >$node_id); } sessionSetNode("10.2"); ?> >[getglobal.php] ><?php session_start();?> ><?php if (!empty($_SESSION)) { extract($_SESSION); } else if >(!empty($HTTP_SESSION_VARS)) { extract($HTTP_SESSION_VARS); } function >sessionGetNode () { return $_SESSION['node']; } $n = sessionGetNode(); >echo ("Node is $n."); ?> > >TIA, >Leston > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php