Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/07/2008, 15:02
Avatar de a83
a83
 
Fecha de Ingreso: noviembre-2005
Ubicación: Santiago de chile
Mensajes: 637
Antigüedad: 18 años, 5 meses
Puntos: 1
Problemas al Actulizar la informacion ?

tengo este codigo que mem muestra los reguistros de de la tablas empleados

Código PHP:
<?
include ("../jao/conexion.php");
$result=mysql_query("SELECT * FROM  tblempleados  ORDER BY Id_Empleado",
  
$conexion);
echo
"

<table width=300>
<tr>
<td><b>Nombre</b></td><td><b>Apellido</b></td><td><b>DNI</b></td><td><b>Actualizar</b></td>
</tr>"
;

while(
$row=mysql_fetch_row($result)){
  echo
"<tr>
    <td>$row[1]</td><td>$row[2]</td><td>$row[3]</td> <td>$row[4]</td>
      <a href=\"actualizar.php?id=$row[0]\">Actualizar</a></td>
    </tr>"
;
}
echo
"</table>";
include 
"cerrar_conexion.php";
?>

el tema es que cuando le doy actulizar no me funciona este es el cod de actualizar

Código PHP:
<?
include ("../jao/conexion.php");

if (!isset(
$accion)){
  
$result=mysql_query("SELECT * FROM tblempleados WHERE Id_Empleado=$Id_Empleado",$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=\"usuario\"><br>
  Apellido:<br>
  <input type=\"text\" value=\"$row[2]\" name=\"apellido\"><br>
  DNI:<br>
  <input type=\"text\" value=\"$row[3]\" name=\"pass\"><br>
  <input type=\"hidden\" name=\"Id_Empleado\" value=\"$row[0]\">
  <input type=\"submit\" value=\"Guardar\">
  </form>
  </body>
  </html>"
;
}elseif(
$accion==guardar){
  
$result=mysql_query("UPDATE tblempleados SET Rut=$rut,
    Apellido=$Apellido, Nombre=$Nombre WHERE Id_Empleado = $Id_Empleado"
,$conexion);
  echo
"
  <html>
  <body>
  <h3>Los registros han sido actualizados</h3>
  </body>
  </html>"
;
}
include 
"cerrar_conexion.php";
?>


no se s me pueden ayudar


y me manda este error

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\siap\betas\actualizar.php on line 10