Ver Mensaje Individual
  #8 (permalink)  
Antiguo 12/11/2015, 14:23
Avatar de marynella
marynella
 
Fecha de Ingreso: septiembre-2015
Ubicación: Bogota
Mensajes: 57
Antigüedad: 8 años, 7 meses
Puntos: 1
Respuesta: Lista desplegable con opción radio button

Cita:
Iniciado por xfxstudios Ver Mensaje
muestra el codigo que tienes para ayudarte en eso
Mira lo que tengo:

Código PHP:
Ver original
  1. if(isset($_POST['guardar'])){
  2.             foreach($_POST['referencia'] as $value) {
  3.                     $value;
  4.                 }  
  5.             if ($result = $conexion->query("INSERT INTO entrada (referencia , cantidad_entrada)
  6.                 VALUES ('$value','{$_POST['cantidad']}')"))
  7.             {
  8.                 echo'<script>
  9.                     alert("Entrada Guardada Exitosamente");
  10.                     window.location.href="../../index1.php";
  11.                 </script>';
  12.             }else{
  13.                 echo'<script>
  14.  
  15.                     alert("Entrada No Guardada");
  16.                     window.location.href="entradas.php";
  17.  
  18.                 </script>';
  19.             }
  20.         }

Código HTML:
Ver original
  1. <tr>
  2.                                     <td style="color: #585858"><font size="4"><b>Referencia:</b></font></td>
  3.                                     <td><SELECT name="referencia[]" style="font-size:15px; width:190px;" mutpiple required></font>
  4.                                         <OPTION value=""></OPTION>
  5.                                                                 <OPTION><?php echo $item;?></OPTION>
  6.                                                             </SELECT></td>
  7.                                 </tr>
  8.                                 <tr>
  9.                                     <td style="color: #585858"><font size="4"><b>Cantidad:</b></font></td>
  10.                                     <td><input type="number" id="cantidad" name="cantidad" min="1" style="width:190px;" required></td>
  11.                                 </tr>