$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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] > "Joe Phyism" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > 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 > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php