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 Quote Link to comment Share on other sites More sharing options...
trq Posted January 6, 2011 Share Posted January 6, 2011 url_encode Quote Link to comment Share on other sites More sharing options...
tHud Posted January 6, 2011 Author Share Posted January 6, 2011 Brilliant! Thank you so much Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.