[PHP] Can't pass query string from HTML to PHP

2003-06-20 Thread Robby Ku
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!

Re: [PHP] Re: Can't pass query string from HTML to PHP

2003-06-20 Thread Robby Ku
Hi again,
 
Thanks for the fast response given. I tried both Jan's and Martin's method but it 
won't solve the problem. 
 
I've tried to change register_globals = On in php.ini and i got the same result.
 
I've tried using $_Get['name'] instead of $name but i got the following error:
 
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or 
T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\Welcome.php on line 5

and I've tried Jan's method and was still unable to pass the query string
 
Pls help!
 
Beginner,
Robbie



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!