Re: Re: change value of session variable?

From: Date: Thu, 22 Jul 2004 05:14:29 +0000
Subject: Re: Re: change value of session variable?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-191476@lists.php.net to get a copy of this message
"John W. Holmes" <holmes072000@charter.net> wrote in message news:40FF4B83.9060008@charter.net... > Five wrote: > > ---------------------------------------------------- > > page1.php > > <?php > > session_start(); > > echo 'page #1<br>'; > > > > echo $_SESSION['favcolor']; > > $_SESSION['favcolor'] = 'green'; > > > > echo '<br><a href="page2.php">page 2</a>'; > > ?> > > > > ---------------------------------------------------- > > page2.php > > <?php > > session_start(); > > echo 'page #2<br>'; > > > > echo $_SESSION['favcolor']; > > $_SESSION['favcolor'] = 'blue'; > > > > echo '<br><a href="page1.php">page 1</a>'; > > ?> > > ---------------------------------------------------- > > This code works exactly the way it's supposed to!! No value first time, > then rotating value!! > > If it does not work for you, are you sure you're accepting the session > cookie? How are you sure? Do you have a valid session.save_path? How do > you know? Are you displaying errors? How do you know? If you see an SID > in the URL when navigating the pages, does it stay the same between > pages or change? > > > -- > > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals – www.phparch.com If you had read my replies you would know how I know. And, oh yeah, if you're not a troll, how would I know?

« previous php.general (#191476) next »