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 does your link in which 'whatever' is look like ? How do you test to see what is in the variable?
This does the job for me:
<?PHP
if ($_GET['x']=='') {$i='whatever "Whatever"'; echo '<a href="get.php?x='.urlencode($i).'">link</a>';
} else
echo 'x is '.urldecode($_GET['x']);
?>
and the url looks like:http://www.XXXXX.nl/get.php?x=whatever+%22Whatever%22
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php