Re: About the $allowed problem
| From: | CC Zona | Date: | Mon, 27 Aug 2001 19:51:07 +0000 |
| Subject: | Re: About the $allowed problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64684@lists.php.net to get a copy of this message | ||
In article <030d01c12f2f$49ca7d20$0b01a8c0@ANDreY>,
ahristov@icygen.com (Andrey Hristov) wrote:
> <?php
> session_start();
> if (!session_is_registered("allowed")){
> $allowed=3306;
> session_register("allowed");
> }
> var_dump($allowed);
> ?>
>
> called with :
> http://192.168.1.11/test2.php?allowed=5000
>
> returns :
> int(3306)
That sets the value of the global variable $allowed to 5000, but of course
setting a variable isn't the same thing as session registering a variable.
Did you perhaps mean to test for...
if(!isset($allowed))
...instead?
--
CC