Re: '&' Sign in _GET Parameter
| From: | Gabriel Guzman | Date: | Fri, 22 Aug 2003 19:16:55 +0000 |
| Subject: | Re: '&' Sign in _GET Parameter | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160442@lists.php.net to get a copy of this message | ||
On Fri, 2003-08-22 at 12:05, Pushpinder Singh Garcha wrote:
> Hello All,
>
> I am using an application where I retrieve user profile from a MySQL
> DB using the Company Name . I pass the name of the company to the PHP
> script as a '$_GET' parameter. e.g. when the name of the company is
> 'IBM'. , the URL with the query string would look like :
> http://masterstream.com/CRM/full_profile_1.php?name=IBM
>
> Now one of the records had a name : PSG & Inc. , in this case the URL
> with the query string would look like
>
> http://masterstream.com/CRM/full_profile_1.php?name=PSG%20&%20Inc
no, this is not how it should look... the '&' in the above query string
is saying the variable 'name' ends and a new variable follows. If you
are submitting this in a form using method=get... it should look
something like:
?name=PSG+%26+Inc
if you are really passing this in a form using method=get, then this
should be handled automatically.
how are you accessing the passed variable?
$_GET['name'] ??