php can't see env var
| From: | Kittiwat Manosuthi | Date: | Fri, 22 Sep 2000 07:35:16 +0000 |
| Subject: | php can't see env var | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17525@lists.php.net to get a copy of this message | ||
Guys this is wierd or may be my ignorance! (After the list is down for 3
days? :-)
Installation:
php4.02 on linux box + apache 1.3.9
Okay, when I type http://myhost/phpinfo.php?name=test
File: phpinfo.php
<?
echo phpinfo();
?>
It works. And it lists the varriable name correctly in PHP Variables
section of phpinfo.
Now, this doesn't work.
File: test.php
<?
echo "name = $name <br>\n";
echo "email = $email <br>\n";
?>
I called it on the browser like this
http://myhost/test.php?name=test&email=test2
It doensn't show anything on the browser. Actually, both GET and POST
doens't yield anything.
But this works.
File: test2.php
<?
$name = $HTTP_GET_VARS["name"];
echo "name = $name<br>\n";
?>
What happens? Did I miss something? What're other info I should post here
to get help? :-)
Thanks
km