Re: Re: change value of session variable?
| From: | Justin Patrin | Date: | Wed, 21 Jul 2004 22:09:22 +0000 |
| Subject: | Re: Re: change value of session variable? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191423@lists.php.net to get a copy of this message | ||
On Wed, 21 Jul 2004 17:45:23 -0400, Five <primeooze@hotmail.com> 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>';
> ?>
>
So you go to page1.php and it has only a link.
You click the link to page2.php and you have 'green' and the link.
You click the link to page1.php and you have 'blue' and the link.
Is this not what happens?
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--