passing string variables in url
| From: | Claudia Smith | Date: | Mon, 09 Apr 2001 20:04:35 +0000 |
| Subject: | passing string variables in url | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47866@lists.php.net to get a copy of this message | ||
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.
The issue I have is for strings that contain single or double quotes. When
I print the value that has been passed in the url the \ is printed. For
example: A Golfer\'s Paradise
I have to tried to decode the string before printing it -- but the \ still
prints.
Here is the code:
$url_title = rawurlencode( $headline );
print "<tr><td><font face='arial' size='1'><font
face='arial' size='1'><a
href='javascript:openQuote(\"http://www.aboutgolf.com/guide/miniquote_form.i
nc.php3?site=$site&ad=$ad®ion=$region&header=$url_title\",
\"helpWin\");'><b>Contact us for more
information</b></a></font>";
And the in the miniquote_form.inc.php3 file:
<?php
$headertitle = rawURLdecode( $header );
print "$headertitle"; ?>