I hope this is just a dumb newbie question with an easy solution/explanation...
I'm a ColdFusion developer who is now learning PHP and I'm having a bit of a problem. Any advice is appreciated.
I've got PHP installed and running (W2K, IIS5), I can call phpinfo() and all the variables display just fine. But when I write code to try to display some of the same variables I get the following error message:
Notice: Undefined variable: HTTP_USER_AGENT in D:\wwwroot\FB3Dev\test.php on line 14
Well, that is my script alright. The code I am using is:
I'm getting this out of tutorials I've printed from the net, and quadruple-checking my syntax. I can't see what I'm doing wrong. I've also tried with other variables such as $SCRIPT_NAME and $PHP_SELF, with similar results. I'm able to successfully set and display the value of other variables, it just seems to have a problem with the built-in variables, but the odd thing is that phpinfo() gives me the right result!