Problem with passing a variable in the URL
Posted: Fri May 23, 2008 10:28 am
Ok so I have a simple bit of code that takes a variable out of the URL using $_GET['Company']; and passing it into an SQL statement. So far it works fine unless the variable has an ampersand symbol in it. If it does it cuts the variable off at the symbol. For example if the URL was
test.php?Company=Company%20test1
the variable would be 'Company test1'. But if the URL was:
test.php?Company=H&H%20Manufacturing
the variable would be 'H'
It always cuts it off at the ampersand. I have tryed passing an actual '&' symbol and I have tried passing & but neither work. Can you guys help me out?
Thanks in advance, and hello everyone! I just signed up as I am an asspiring PHP coder trying to make a name for myself!
Al
test.php?Company=Company%20test1
the variable would be 'Company test1'. But if the URL was:
test.php?Company=H&H%20Manufacturing
the variable would be 'H'
It always cuts it off at the ampersand. I have tryed passing an actual '&' symbol and I have tried passing & but neither work. Can you guys help me out?
Thanks in advance, and hello everyone! I just signed up as I am an asspiring PHP coder trying to make a name for myself!
Al