Re: & sign not posted to next page
| From: | BAO RuiXian | Date: | Fri, 20 Feb 2004 13:33:20 +0000 |
| Subject: | Re: & sign not posted to next page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178343@lists.php.net to get a copy of this message | ||
Piet from South Africa wrote:
>i have the following problem.
>
>when i href like this
>
> <a href="nextpage.php?name=$name">
>
>and the name contains a & sign, it does not post it to the next page.
>
>if the name is bed&breakfast it stops at bed.
>
>
Because '&' is a special character in URL, you need to escape it by
urlencode it first before pass it, i.e.
$encodename = urlencode($name);
<a href="nextpage.php?name=$encodename">
Best
Bao
>Can anyone tell me how to do this.
>
>
>