Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/06/2009, 09:27
Avatar de juanleonardo
juanleonardo
 
Fecha de Ingreso: agosto-2007
Mensajes: 382
Antigüedad: 17 años, 7 meses
Puntos: 0
Pequeño problema con form

Hola amigos resulta q lo q quiero hacer es un por ejemplo este:
Cita:
<form method="post" action="prueba.php">
<select name="nivel_1" onchange="javascript:this.form.submit();">
<option>Admin</option>
<option>Espec</option>
<option>Comun</option>
</select>
<select name="nivel_2" onchange="javascript:this.form.submit();">
<option>Admin</option>
<option>Espec</option>
<option>Comun</option>
</select>
<select name="nivel_3" onchange="javascript:this.form.submit();">
<option>Admin</option>
<option>Espec</option>
<option>Comun</option>
</select>
</form>
y lo unico q quiero es q cuando cambie decir se hizo clic en tal nivel, yo lo hago asi
Cita:
$nivel = "nivel_1";
if (isset($_POST[$nivel]))
echo "sehizo clic en ".$nivel;

$nivel = "nivel_2";
if (isset($_POST[$nivel]))
echo "sehizo clic en ".$nivel;

$nivel = "nivel_3";
if (isset($_POST[$nivel]))
echo "sehizo clic en ".$nivel;
gracias por la ayuda