Forum Moderators: coopster
} else {
$ordervar = "row1";
}
<td>
<input type=image name="ordervar" value="row2" src="imgs/here.gif" hspace="3" width="5" align="absmiddle">
</td>
<td>
<input type=image name="ordervar" value="row3" src="imgs/here.gif" hspace="3" width="5" align="absmiddle">
</td>
$sql = "SELECT * FROM BLABLA ORDER BY $ordervar";
=============================================
Thanks
Firstly, your inputs have the same name. If you want to keep this, but just have them submitted in an array, you must add '[]' to the end of the name (name="ordervar[]"), otherwise you should make the names unique. Secondly, I don't see where $_POST["ordervar_x"] and $_POST["ordervar_y"] are coming from.