RE: [PHP] Problem with this string...
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Wed, 13 Sep 2000 02:31:17 +0000 |
| Subject: | RE: [PHP] Problem with this string... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16478@lists.php.net to get a copy of this message | ||
You have to http encode your strings, otherwise they don't work as
predicted.
Probably something like this is better:
print "<a href='shop_showcat.php?item_type=". urlencode($item_type1) .
"'>Link here</a>";
-----Original Message-----
From: Shane McBride [mailto:php@riversidedesigns.net]
Sent: September 13, 2000 10:34 AM
To: Php-General
Subject: [PHP] Problem with this string...
I pass this directly to a php page, and then print the variable again:
echo "<a href=\"shop_showcat.php?item_type=$item_type1\">";
Which equals this is the browser location:
http://www.myserver.com/shop_showcat.php?item_type=Mattresses%20&%20Mattress
%20Pads
And when I echo the variable item type inside the shop_showcat.php, all I
get is:
Mattresses
What am I doing wrong?
TIA,
Shane