When I use this link I expect $cat and $sortkey to be available in the target programme but they ain’t. I’ve also tried method=post, no luck. The HTTP_VARS (POST & GET) are empty.
I’m obviously missing something, who can tell me what?
Thanks. I inserted the query exactly as shown but get this message: (The first 2 words are the contents of the 2 parameters)
art
Author
mysql error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 3 in query SELECT * FROM books WHERE catalog= ‘’ ORDER BY
The code, the error is somewhere in the ORDER BY line?
echo $_GET['catalog'];
echo "<br>";
echo $_GET['sortkey'];
echo "<br>";
$query = "SELECT * FROM books
WHERE catalog='" . mysql_real_escape_string($catalog) . "'
ORDER BY " . mysql_real_escape_string($sortkey) ;