var_dump before session_start won't work because session_start() uses internally
header().
The idea is that there is no use of $allowed before session_start(). The name is
session_start, so it has to be the first statement
in the script or the first after include-s/require-s. As I said it is good practice to
use $SESSION_VARS array, or $HTTP_GET_VARS
$HTTP_POST_VARS for session/get/post variables
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
----- Original Message -----
From: "Antonio S. Martins Jr." <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 10:42 PM
Subject: Re: [PHP] About the $allowed problem
> 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: [EMAIL PROTECTED] | Heart of Men!" |
> | [EMAIL PROTECTED] | !!! 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
> / \
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]