Re: sessions

From: Date: Tue, 23 Jul 2002 16:45:13 +0000
Subject: Re: sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-109093@lists.php.net to get a copy of this message
You forgot the session_start(); call. You will have to do that before you can tap into registered vars. Hope that helps. Jas "Alexander Ross" <alexross@bleen.net> wrote in message news:20020710152354.7439.qmail@pb1.pair.com... > I'm trying to understand sessions so I can set session variables. I set up 2 > very simple pages: > > Page 1: > > <? > session_start(); > $test_var = "froggy"; > session_register('test_var'); > ?> > <a href="page2.php">Click here</a> > > > Page 2: > > <? > print $test_var."!"; > ?> > > > This doesn't seem to work though. $test_var doesn't seem to have a value > when I go the second page. What am I missing. Thanks for helping a newbie. > > Alex > >

« previous php.general (#109093) next »