potrebbe essere una cosa di qst tipo:
codice:
if (isset($_GET['cat'])){
$sql="SELECT * FROM retribuzione WHERE CAT = '{$_POST['categoria']}'";
$result=mysql_query($sql) or die(mysql_error());
while ($row=mysql_fetch_assoc($result))
echo $row['RET_BASE']."
".$row['IND_COMP']."
";
} else {
echo "<form name=\"form\" method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">
<select name=\"categoria\" onchange=\"window.location=('{$_SERVER['PHP_SELF']}?cat='+this.options[this.selectedIndex].value)\">
<option value=\"\">scegli</option>
<option value=\"c\">scegli</option>\n";
$st=mysql_query("SELECT CAT FROM retribuzione ORDER BY CAT") or die(mysql_error());
while ($row=mysql_fetch_assoc($st))
echo "<option value=\"{$row['CAT']}\">{$row['CAT']}</option>\n";
echo "</select>
<input type=\"submit\" name=\"Submit\" value=\"Invia\">
</form>\n";
}