I did as you said Richard, however I still encounter the same problem,
you can take a look at the code in test.txt, I updated it too.
For other people, here is the original message:
Hello,
I got this example of sessions: www.net.co.cr/test/test.php ,
however, as you can see in the code at /test/text.txt , isnt $_SESSION
['tree'] suppose to contain a value and not be NULL?
Thanks.
> > >www.net.co.cr/test/test.php
> >
> > <?
> > if ($QUERY_STRING == "")
> > {
> > session_start();
> > $_SESSION['tree'] = "green";
> >
> >
> >
> > Change the line above to these two lines:
> > session_register('tree');
> > $tree = 'green';
> >
> > Think of $_SESSION (and the other $_XXX vars) as "read-only"
> >
> > Use session_register() to say which variables should "live long and
> prosper"
> > and then just use them like regular variables.
> >
> >
> > echo '<HTML>
> > <HEAD>
> > <TITLE>frame session test</TITLE>
> > </HEAD>
> >
> > <FRAMESET cols="165,*" border=0 frameborder=0 framespacing=0">
> > <FRAME SRC="?1.html" name="mainMenu" MARGINWIDTH="0"
> MARGINHEIGHT="0"
> > border=0 frameborder=0 FRAMESPACING="0" NORESIZE SCROLLING="no">
> > <FRAME SRC="?2.html" name="right" MARGINWIDTH="0" WIDTH="0"
> border=0
> > frameborder=0 FRAMESPACING="0">
> >
> > </FRAMESET>
> >
> > </HTML>'; }
> >
> > if ($QUERY_STRING == "1.html")
> > { echo "<b>This is just a dummy frame.</b>"; }
> >
> > if ($QUERY_STRING == "2.html")
> > {
> > echo "<b>";
> > echo "The value of \$_SESSION['tree'] is:";
> > echo gettype($_SESSION['tree']);
> > echo "</b>";
> > }
> >
> > ?>
> >
> >
> > --
> > Like Music? http://l-i-e.com/artists.htm
> >
> >
> > --
> > 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