RE: [PHP] Can't pass query string from HTML to PHP
| From: | Martin Towell | Date: | Fri, 20 Jun 2003 06:20:59 +0000 |
| Subject: | RE: [PHP] Can't pass query string from HTML to PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152275@lists.php.net to get a copy of this message | ||
check your php.ini file to see if you have register_globals set to "on" or
"off" (probably "off")
You can either turn it "on" or use $_GET["name"]
-----Original Message-----
From: Robby Ku [mailto:robbyku@yahoo.com]
Sent: Friday, 20 June 2003 4:06 PM
To: php-general@lists.php.net
Subject: [PHP] Can't pass query string from HTML to PHP
Hi,
I've got a problem passing a query string from a HTML file to a PHP file. I
created a HTML file called "welcome.html" with the following link:
<a href="welcome.php?name=Andy"> Hi, I'm Andy </a>
I am trying to pass the query string Andy to a PHP file called "welcome.php"
with the following command:
<?php echo ("Welcome, $name!"); ?>
After i load "welcome.html" in my browser, i try linking it to "welcome.php"
through the hyperlink i created. But the result i got was
"Welcome, !"
Where is Andy? If the code has got no problem, could it be the Web server
(IIS) or the browser (IE) im using? Or the configuration of the Web server
is not correct? Pls help!
Thank You
Beginner,
Robbie
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
__________ Information from NOD32 1.436 (20030612) __________
This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com