tHud Posted January 6, 2011 Share Posted January 6, 2011 Hi I am trying to send a company name to a form for users to report errors. echo "<a href=\"http://www.example.com/suppliers.php?companyName=$compName\">$compName</a>"; In the form, I have the usual code which I use to fill in the value of a field... $companyName = $_REQUEST['companyName']; This works fine - except if there is an ampersand in the name. A & B Products...., becomes just A I have tried htmlentitles to convert to & but the problem still exists. Any thoughts on how I could correct this? Thanks Link to comment https://forums.phpfreaks.com/topic/223569-parsing-an-ampersand-via-_request/ Share on other sites More sharing options...
trq Posted January 6, 2011 Share Posted January 6, 2011 url_encode Link to comment https://forums.phpfreaks.com/topic/223569-parsing-an-ampersand-via-_request/#findComment-1155666 Share on other sites More sharing options...
tHud Posted January 6, 2011 Author Share Posted January 6, 2011 Brilliant! Thank you so much Link to comment https://forums.phpfreaks.com/topic/223569-parsing-an-ampersand-via-_request/#findComment-1155686 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.