RE: [PHP] session bug or feature
| From: | Johnson, Kirk | Date: | Thu, 07 Aug 2003 16:58:48 +0000 |
| Subject: | RE: [PHP] session bug or feature | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158684@lists.php.net to get a copy of this message | ||
> <?php
>
> session_start();
>
> // lets say this equals "bar" and it was set on a previous page
> $_SESSION["foo"];
>
> $foo = "rab";
>
>
> echo $_SESSION["foo"];
>
> ?>
>
> The problem is, when I set the global variable $foo="rab",
> when I echo the
> session variable $_SESSION["foo"], it outputs "rab" instead
> of "bar"?!
Try setting register_globals to "off" in your php.ini file.
Kirk