IN your php.ini config file, look for the line "register_globals".
It is probablly set to 'off' right now. Simply set ti to 'on'.
However, this may lead to security problems, and I advise you code your
script to avoid this.
----- Original Message -----
From: "Joe Phyism" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 21, 2003 9:29 PM
Subject: [PHP-INST] Problem on getting value.
> Dear all,
>
> I am using Apache 1.3.26 and PHP 4.3.2, running on Windows XP as local web
> server, however, I encounter the following problem when I try to execute
my
> PHP script.
>
> [source of show.php]
> <?
> if ( $a == 1 ) {
> echo "True.";
> } else {
> echo "False.";
> }
> ?>
> [source end]
>
> I try to use IE to see the result, however, no matter
> http://localhost/show.php or http://localhost/show.php?a=1, the result is
> the same - "False.".
>
> I have asked on php.lang and the problem is generally solved by the
> following modification on my script:
> <?
> if ( $_GET['a'] == 1 ) {
> echo "True.";
> } else {
> echo "False.";
> }
> ?>
> But I want to use the script above, how can I change my configuration?
> Helper on the newsgroup told me that "If so then you are expecting
'Globals'
> to be set as 'on' and they're set to 'off'.", what does that mean?
>
> Thank you very much.
>
>
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php