Problems with quotes in URL
| From: | Petre Agenbag | Date: | Wed, 18 Jun 2003 08:55:28 +0000 |
| Subject: | Problems with quotes in URL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151939@lists.php.net to get a copy of this message | ||
Hi List
I don't know what I'm doing wrong:
Firstly, I upgraded from 4.0.1 to 4.3.1 and made sure that I have
similar settings in php.ini wrt register_globals and magic_quotes.
I now have problems with some of my apps:
For instance:
IN a mysql db, I would have a name like :[ whatever "whatever" ]
I do a select on the table and then echo the name on a page, as well as
add it to a url:
page.php?myvar=$myvar
where $myvar contains the [ whatever "whatever" ]
Now, when I try to echo $myvar on the page.php, I don't get the entire
story.
I tried to addslashes() before the url line, I tried urlencode() and
htmlspecialchars, all causes an echo of $myvar on the page.php page to
only display whatever , or, whatever \ but NEVER, whatever "whatever"
What am I doing wrong?
Thanks