Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in c:\wamp\www\pagina universidad backup servidor\postgrado\actualizar.php on line 6
Nombre:
Apellido:
DNI:
El codigo de actualizar.php es :
Código PHP:
<?
include "conexion.php";
if (!isset($accion)){
$result=mysql_query("SELECT * FROM coordinador WHERE Id=$Id",$conexion);
$row=mysql_fetch_row($result);
echo"<html>
<head><title>Actualizar datos de la base</title></head>
<body>
<form action=\"actualizar.php?accion=guardar\" method=\"POST\">
Nombre:<br>
<input type=\"text\" value=\"$row[1]\" name=\"nombre\"><br>
Apellido:<br>
<input type=\"text\" value=\"$row[2]\" name=\"apellido\"><br>
DNI:<br>
<input type=\"text\" value=\"$row[3]\" name=\"dni\"><br>
<input type=\"hidden\" name=\"id\" value=\"$row[0]\">
<input type=\"submit\" value=\"Guardar\">
</form>
</body>
</html>";
}elseif($accion==guardar){
$result=mysql_query("UPDATE usuarios SET nombre=$nombre,
apellido=$apellido, dni=$dni WHERE id = $id",$conexion);
echo"
<html>
<body>
<h3>Los registros han sido actualizados</h3>
</body>
</html>";
}
include "cerrar_conexion.php";
?>
$row=mysql_fetch_row($result);-----> linea 6
Que estara pasando no recoge la variable Id, e colocado _POST["$Id"] con el _GET, etc y nada me`puede dar una mano por favor????