Re: About the $allowed problem
| From: | Antonio S. Martins Jr. | Date: | Mon, 27 Aug 2001 19:42:45 +0000 |
| Subject: | Re: About the $allowed problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64683@lists.php.net to get a copy of this message | ||
On Mon, 27 Aug 2001, 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)
Ok,
remeber, on the first run the var isn't registered, then you set it to
"3306", on the subsequents calls it restore the value on the
"session_start();" then the value "3306" will replace the "5000". Try
puting the "var_dump" before the "session_start", or try testing
"$HTTP_GET_VARS[allowed]" .
Antonio.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows |
| WorldNet Internet Maringa - PR - Brasil | what evil lurks in the |
| E-Mail: shadow@wnet.com.br | Heart of Men!" |
| shadow@uem.br | !!! Linux User: 52392 !!! |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!
/"\
\ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \