Ver Mensaje Individual
  #7 (permalink)  
Antiguo 03/11/2014, 10:39
gm93
 
Fecha de Ingreso: octubre-2014
Mensajes: 29
Antigüedad: 9 años, 4 meses
Puntos: 0
Respuesta: Coger el valor de un radiobutton de elementos de una tabla

Le e añadido lo siguiente a mi codigo porque creo que no se ha entendido bien:

Código PHP:
Ver original
  1. <html>
  2.     <head>
  3.         <meta charset="UTF-8">
  4.         <title></title>
  5.     </head>
  6.     <body>
  7.         <?php
  8.         $conexion=mysqli_connect("Localhost", "root", "root")
  9.                 or die("Fallo en el establecimiento de la conexion");
  10.         mysqli_select_db($conexion, "BD_EMPLEADOS")
  11.                 or die("Error en la seleccion de la base de datos");
  12.         $result=  mysqli_query($conexion, "select * from empleados")
  13.                 or die("Error en la consulta SQL");
  14.         ?>
  15.         <table border="1">
  16.             <tr>
  17.                 <th><th>
  18.                 <th>NIF</th>
  19.                 <th>NOMBRE</th>
  20.                 <th>APELLIDOS</th>
  21.                 <th>SALARIO</th>
  22.                 <th>ALTA</th>
  23.                 <th>DEPARTAMENTO</th>
  24.             </tr>
  25.             <?php
  26.             foreach ($result as $row){?>
  27.             <tr>
  28.                 <td><input type="radio" name="RADIO_EMP"></td>                
  29.                 <td><?php echo $row["NIF"]; ?></td>
  30.                 <td><?php echo $row["NOMBRE"]; ?></td>
  31.                 <td><?php echo $row["APELLIDOS"]; ?></td>
  32.                 <td><?php echo $row["SALARIO"]; ?></td>
  33.                 <td><?php echo $row["ALTA"]; ?></td>
  34.                 <td><?php echo $row["DEPARTAMENTO"]; ?></td>
  35.             </tr>
  36.             <?php } ?>
  37.         </table>
  38.         <br>
  39.         <a href="index.php">Volver a la pantalla de inicio</a>
  40.     </body>
  41. </html>

Necesito una solucion urgente por favor y gracias por vuestra ayuda