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

Le he puesto GET al formulario y lo que me as dicho pero me sigue apareciendo el mismo error de antes. Este es el código para que me digas que puedo tener mal:

Código PHP:
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        session_start
();
        if(isset(
$_SESSION['NIF'])){
            
$nif=$_SESSION['NIF'];
        }
        else{
            
$nif="";
        }
        echo 
$nif;
        
$conexion=mysqli_connect("127.0.0.1""root""root")
                or die(
"Fallo en el establecimiento de la conexion");
        
mysqli_select_db($conexion"BD_EMPLEADOS")
                or die(
"Error en la seleccion de la base de datos");
        
$consul=mysqli_query($conexion"SELECT * FROM empleados WHERE NIF='$nif'")
                or die(
"Error en la sentencia SQL");
        while(
$row=  mysqli_fetch_assoc($consul)){
            
$modi[]=$row;
        }
        
?>
        <form action="" methof="GET">
            <?php
            
foreach ($modi as $row){?>            
            NIF<input maxlength="9" size="9" value="<?php echo $row["NIF"]; ?>" name="NIF" type="text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            NOMBRE <input maxlength="15" size="20" value="<?php echo $row["NOMBRE"]; ?>" name="F_NOM" type="text">&nbsp;&nbsp;&nbsp;
            APELLIDOS <input maxlength="25" size="30" value="<?php echo $row["APELLIDOS"]; ?>" name="F_APELL" type="text"><br>
            SALARIO <input value="<?php echo $row["SALARIO"]; ?>" name="F_SAL" type="number">&nbsp;&nbsp;&nbsp;&nbsp; 
            FECHA DE ALTA <input maxlength="10" size="10" value="<?php echo $row["ALTA"]; ?>" name="F_ALTA" type="text"><br>
            DEPARTAMENTO <input maxlength="4" size="10" value="<?php echo $row["DEPARTAMENTO"]; ?>" name="F_DPTO" type="text"><br>
            <br>
            <button value="Aceptar" name="Aceptar">Aceptar</button><br>
            <?php ?>
        </form>
    </body>
</html>