Jump to content

parsing an ampersand via _REQUEST


tHud

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.