I am trying that when the user chose a specific value of drop down menu, then to execute a specific query.. I have this drop down menu
<select id="cmimetlist" onChange="dropdown()">
<option value="1"> me pak se 1000</option>
<option value="2">midis 1000 dhe 2000</option>
<option value="3">me shume se 2000</option>
</select>
and this function in javascript
<script>
function dropdown()
{
var e = document.getElementById("cmimetlist");
var vlera = e.options[e.selectedIndex].value;
alert(vlera);
}
</script>
but how to make it that instead of alert do this:
if (vlera == 1)
then execute this query
$run = mysql_query("select * from restorantet, menu where ID_Rest=Rest_ID and Cmimi<1000 ORDER BY Cmimi LIMIT $startrow, 10 ") or Die("ska me te dhena");
if (vlera == 2)
execute another query
Thanks in advance