RE: [PHP] Strings in URL
| From: | Jack Dempsey | Date: | Tue, 27 Mar 2001 02:44:18 +0000 |
| Subject: | RE: [PHP] Strings in URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45683@lists.php.net to get a copy of this message | ||
I believe you have to urldecode. Try that and see what happens...
-jack
-----Original Message-----
From: Claudia [mailto:claudiasmt@sprynet.com]
Sent: Monday, March 26, 2001 9:41 PM
To: php-general@lists.php.net
Subject: [PHP] Strings in URL
I am attempting to pass a string value via a URL. I have tried using
urlencode and ereg_replace--with no luck.
Here is sample code:
$headline=urlencode("$headline");
print "<a href
='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&
subject=$headline'><b>Contact us for more
information</b></a></font>";
Then in the quotepage.php3 file
if( $page == "miniquote" )
{
print "Get A Quote<br>";
print "$subject";
print "$site";
INCLUDE "mini_quote.inc.php3";
}
--->The print "$subject"; line prints nothing.
If I print $headline right after I assign the variable it prints correctly
with +s in place of the blanks for this variable.
Any suggestions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net