RE: [PHP] Re: Can't pass query string from HTML to PHP
| From: | Ford, Mike [LSS] | Date: | Fri, 20 Jun 2003 09:02:34 +0000 |
| Subject: | RE: [PHP] Re: Can't pass query string from HTML to PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152288@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Robby Ku [mailto:robbyku@yahoo.com]
> Sent: 20 June 2003 08:25
>
> 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.
Did you restart your Web server after making the change?
> I've tried using $_Get['name'] instead of $name but i got the
> following error:
That's $_GET -- PHP variable names are case-sensitive, so $_Get is not the
same thing.
> 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
I'm guessing here since you didn't post your revised code, but are you
trying to interpolate it in a double-quoted string? Then you also need to
use braces, like:
echo "Welcome, {$_GET['name']}";
If it's not that, post your code as it is now for people to look at.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211