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:[EMAIL PROTECTED]
Sent: Friday, 20 June 2003 4:06 PM
To: [EMAIL PROTECTED]
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




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to