Re: Re: Problem on passing value.

From: Date: Mon, 23 Jun 2003 10:14:00 +0000
Subject: Re: Re: Problem on passing value.
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-20514@lists.php.net to get a copy of this message
$HTTP_GET_VARS - This is an example of the old style super globals. However, php is now moving over to a simpler method... $HTTP_GET_VARS is becoming $_GET['x'] Post variables all arrvie as $_POST['x'] Session variables are $_SESSION['x'] Cookie variables are $_COOKIE['x'] and so on. I strongly suggest reading more about the new variables at http://uk2.php.net/manual/en/language.variables.predefined.php Stephen P.S. The variables are case sensitive... ie they have to be written all in capitals! ----- Original Message ----- From: "Cristian MARIN" <cristic@iakt.rdsnet.ro> To: <php-windows@lists.php.net> Sent: Monday, June 23, 2003 6:17 PM Subject: [PHP-WIN] Re: Problem on passing value. > Of corse: > > The code should look like this : > > <? > if ( $HTTP_GET_VARS['a'] == 1 ) { > echo "True."; > } else { > echo "False." > } > ?> > > Now if you type the http://localhost/show.php?a=1 you'll > have 'true' > otherwise 'false' > > > -- > ------------------------------------------------- > Cristian MARIN - Developer > InterAKT Online (www.interakt.ro) > Tel: +4021 312.53.12 > Tel/Fax: +4021 312.51.91 > cristic@interakt.ro > "Joe Phyism" <yimkc@hkusua.hku.hk> wrote in message > news:20030621085909.52360.qmail@pb1.pair.com... > > The source of show.php: > > <? > > if ( $a == 1 ) { > > echo "True."; > > } else { > > echo "False." > > } > > ?> > > > > However, no matter what I type in URL of browser, like > > http://localhost/show.php?a=1 or > > http://localhost/show.php, the result is > > the same - "False.". > > Can anyone help me? Is it the problem of my setting in Apache? > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#20514) next »