Re: Newbie - Can't get sessions to work

From: Date: Wed, 22 Oct 2003 18:40:45 +0000
Subject: Re: Newbie - Can't get sessions to work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167148@lists.php.net to get a copy of this message
Your right :) I think he's using the brackets instead of parenthesis in the echo's. Change the {} to () --- John Nichel <jnichel@by-tor.com> wrote: > Daniel Guerrier wrote: > > The second page should be > > > > <?php > > session_start(); > > echo { $_SESSION['foo'] . "<BR>\n"); > > echo { $_SESSION['bar'] }; > > ?> > > > > you're missing the session_start() > > > > You need it on every page that you plan to use > session > > on. > > He has session_start() on page two. > > <snip> > >>> > >>>page2.php > >>>---------- > >>><?php > >>> session_start(); > >>> echo "foo = {$_SESSION['foo']}"; > >>> echo "bar = {$_SESSION['bar']}"; > >>>?> > >> > >>Same here.... > >> > >><?php > >> echo { $_SESSION['foo'] . "<BR>\n"); > >> echo { $_SESSION['bar'] }; > >>?> > </snip> > > -- > By-Tor.com > It's all about the Rush > http://www.by-tor.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com

« previous php.general (#167148) next »