I have the following code:
<?php
print "1. " . $_GET['c'] . "-2. " . $_GET['s'];
?>
The file is called test_globals.php.
On most servers I can type:
http://servername/test_globals.php?c=yes&s=no
and the output will be similar to:
1. yes-2. no
However, on one server, I get the following result:
1. -2.
My question is, why doesn't $_GET return the values of "yes" and "no" ?
On this server (which is running Apache 2.0 and PHP 4.2.2), register_globals is set to 'on' and safe-mode is set to 'off'. I've already tried to change the code to:
<?php
print "1. " . $c . "-2. " . $s;
?>
and still get the result:
1. -2.
Are there any other directives that must be set in a certain way to enable
$_GET ?
Thanks all.
Sean