Re: passing string variables in url
| From: | Alexander Wagner | Date: | Mon, 09 Apr 2001 20:12:15 +0000 |
| Subject: | Re: passing string variables in url | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47871@lists.php.net to get a copy of this message | ||
Claudia Smith wrote:
> I am passing a string value via a url to be used for printing on a
> page and for sending info via email.
>
> I first encode the string before passing it.
This is correct, but you should be using urlencode() instead of
rawurlencode(). To be frank, I don't know what the difference is,
exactly (never used the raw ones), but I think urlencode() is more
appropriate here.
> I have to tried to decode the string before printing it -- but the \
> still prints.
You don't need to decode. This is done automatically. The "problem" is
that the so called "magic quotes" are active. These do an addslashes()
on all GET, POST... data. You can undo this with stripslashes().
regards
Wagner
--
"I haven't committed a crime. What I did was fail to comply with the
law."
David Dinkins, New York City Mayor