I have a web form where I want to have users able to select how the MySQL database is ordered:
<select name="listord">
<option value="wayno" selected="selected">Way number</option>
<option value="name">boat name</option>
...
</select>
$ordTerms=$_GET["listord"];
$pkresult=mysql_query("select * from packetsdb order by ".$ordTerms);
For one reason or another, the results are never returned in the properly selected order. What am I missing here?