Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/05/2007, 20:37
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Actualizacion

Tu problema es que estas poniendo tus campos en tu tabla, todos se llaman id, eso es un error ya que en donde los vayas a recibir se van a sobreescribir, luego tienes una etiqueta con un link a una pagina: actualisa_datos.php, que por cierto es actualiza, donde esperas recibir datos por POST. Nunca los vas a recibir porque no tienes un formulario.

Necesitas hacer algo asi:
Código PHP:
<?php
while ($row mysql_fetch_array($result))

?>
<form action="<?php echo "actualisa_datos.php?id=$row[id]"?>" method="post">
<tr><td><input type="text" name="id" size="20" value="<?php echo $row['id']; ?>"/></td>
<td><input type="text" name="sub_categoria" size="20" value="<?php echo $row['sub_categoria']; ?>"/></td> 
<td><input type="text" name="id" size="20" value="<?php echo $row['nombre']; ?>"/></td> 
<td><input type="text" name="marca" size="20" value="<?php echo $row['marca'];?>"/></td>
<td><input type="text" name="modelo" size="20" value="<?php echo $row['modelo'];?>"/></td>
<td><input type="text" name="n_serie" size="20" value="<?php echo $row['n_serie'];?>"/></td>
<td><input type="text" name="precio" size="20" value="<?php echo $row['precio'];?>"/></td>
<td><input type="text" name="descripcion" size="20" value="<?php echo $row['descripcion'];?>"/></td>

<td><input type="submit" name="modifica" value="Modificar" /></td>
<td><a href="<?php echo "borrar.php?id=$row[id]"?>">Eliminar</a></td>
</tr>
</form>
<?php
}
?>