prova così
Codice PHP:
<?php
if (!empty(@$_POST["scelta_localita"])) $query = "SELECT * FROM consegna WHERE desc_localita=$_POST['scelta_localita'] group by desc_localita";
else $query = "SELECT * FROM consegna group by desc_localita";
$res = mysql_query($query) or die(mysql_error());
echo "<label>";
echo "Cerca il localita ";
echo "<select name='scelta_localita'>";
echo "<option selected='selected'>".''."</option>";
while($row= mysql_fetch_array($res)){
echo "<option>".$row['desc_localita']."</option>";
}
echo "</select>";
echo "</label>";
?>