For some reason my script is not recognizing get variables passed to it. I have tried multiple ways of accessing the GET values and they are always empty.
Ex:
Call page via test.php?value=hello
test.php code
[tt]
<?
include_once("script.php"
?>
<html>
<head>
</head>
<body>
...
<?
show();
?>
...
</body>
</html>
script.php code
<?
...
function show()
{
echo "\$HTTP_GET_VARS[\"value\"] = " . $HTTP_GET_VARS["value"] . "<br />";
echo "\$_GET[\"value\"] = " . $_GET["value"] . "<br />";
echo "\$value = $value<br />";
}
...
?>
[/tt]
output:
...
$HTTP_GET_VARS["value"] =
$_GET["value"] =
$value = ...
PHP Version 4.0.1pl2 running as Apache module on BSDI (So I know the $_GET won't work since it didn't come into being until 4.1 but the others should work (or at least one of them depending on values in php.ini).
Doing the same thing on local test machine PHP v4.1.1 w/ Apache on Win2KPro works fine.
Any thoughts would be greatly appreciated.
Tone
Ex:
Call page via test.php?value=hello
test.php code
[tt]
<?
include_once("script.php"
?>
<html>
<head>
</head>
<body>
...
<?
show();
?>
...
</body>
</html>
script.php code
<?
...
function show()
{
echo "\$HTTP_GET_VARS[\"value\"] = " . $HTTP_GET_VARS["value"] . "<br />";
echo "\$_GET[\"value\"] = " . $_GET["value"] . "<br />";
echo "\$value = $value<br />";
}
...
?>
[/tt]
output:
...
$HTTP_GET_VARS["value"] =
$_GET["value"] =
$value = ...
PHP Version 4.0.1pl2 running as Apache module on BSDI (So I know the $_GET won't work since it didn't come into being until 4.1 but the others should work (or at least one of them depending on values in php.ini).
Doing the same thing on local test machine PHP v4.1.1 w/ Apache on Win2KPro works fine.
Any thoughts would be greatly appreciated.
Tone