I just installed PHP on my Win2k box, and am having some weird issues...it seems I can't pass a variable from one page to another! I setup a link like
href="test.php?foo=bar"
When I print out the value of $foo, there's nothing there. I also tried a while statement to loop through each $HTTP_POST_VAR, and no variables are present, ever. I installed PHP on a Win2k mchine a couple of weeks ago, and never had an issue like this.
Can someone help?
Okay...when I use THIS script:
while (list ($key, $value) = each ($HTTP_GET_VARS)) { print "$key: $value<br>"; }
I can get the page to print off: foo:bar
However, I can't simply use: print $bar;
Nothing prints! Any ideas?
register_globals is off (this is the default starting with PHP 4.2.0)
read more about it at http://www.php.net/manual/en/language.variables.predefined.php