RE: [PHP] trouble passing variables through a URL
| From: | James Hallam | Date: | Mon, 04 Feb 2002 19:49:58 +0000 |
| Subject: | RE: [PHP] trouble passing variables through a URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83439@lists.php.net to get a copy of this message | ||
(try again - Sorry for the double)
my config: PHP 4.1.1/NT/iPlanet 6.1
This is the URL in its <A> tag:
<A
HREF="test_mediacoverage.php?locale=en_na&sec=news&subsec=media&name=infowee
k1">Media Coverage Test Page</A>
Those variables are supposed to be used to populate this SQL statement:
$sql = "SELECT comp, content FROM $locale
WHERE sec = '$sec' AND
subsec = '$subsec' AND
name = '$name'
ORDER BY comp
";
If I hard code the variables in on the page it works, but if I leave it as
is, I get this:
You have an error in your SQL syntax near 'WHERE sec = '' AND subsec = ''
AND name = '' ORDER BY comp ' at line 2
Any idea why these aren't being passed?
James Hallam