Hi Nogdog
I am having serious problems sorting a table according to the users option. I already have a working php code to display the table, I just have problems with the code to display the table with options the user has selected.
The user can select an option of either asc or desc order from a drop box and the column they want arranged in the specified way.
I have been able to develop the following code and keep getting an error message.Below is the code I generated n the error:
<?php
if (isset($_POST['submitted']))
$walkIn = $_POST['WalkIn'];
$walkOut = $_POST['WalkOut'];
$result = mysql_query("SELECT * FROM Results ORDER BY $walkIn $walkOut ")
or die(mysql_error());
?>
the html
<tr>
<td>
Display table in =
<select name="WalkIn">
<option value="Please Choose">Please Choose</option>
<option value="asc">Ascending order</option>
<option value="desc">Descending order</option>
</select>
</td>
<td>
on =
<select name="WalkOut">
<option value="Please Choose">Please Choose</option>
<option value="Goliath">Goliath</option>
<option value="Samson">Samson</option>
</select>
</td>
</tr>
would appreciate a guide in the right direction