I have a code similar to this one:
echo "<select name='$nombre' id='$id'>";
echo "<option value='0'>Seleccione opcion</option>";
while ($row=mysql_fetch_assoc($result)){
$id= $row[$campo_valor];
$texto= $row[$campo_visual];
$sel="";
if ($default==$id){
$sel="Selected";
}
echo "\n <option value='$id' $sel>$texto</option>";
}
echo "</select>";
I would like to know how to collect the value of the option (value="$ id"), since by picking up the value of the select, the result is 0.
Thank you very much