Ver Mensaje Individual
  #10 (permalink)  
Antiguo 05/07/2012, 15:00
ruben_chirinos_1985
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Modificar varios campos de tabla con un solo clickz

Hola no tampoco me da mas errores ahora la verdad no entiendo q estare haceidno mal, ahora me salen q todas la variables no estan definidas es decir nombre, apellido, email,

aqui vuelvo a subir como me dijiste q probara

<form name="form1" method="post" action="modificar11.php">
<tr>
<table width="500" border="1" cellpadding="0">
<td align="center"><strong>Id</strong></td>
<td align="center"><strong>Nombre</strong></td>
<td align="center"><strong>Apellido</strong></td>
<td align="center"><strong>Email</strong></td>
<?php
while ($fila=mysql_fetch_array($resultado)) {
?>
</tr>
<tr>
<td align="center">
<?php $Id[]=$fila['Id'];?>
<?php echo $fila['Id'];?></td>
<td align="center">
<input type="text" name="Nombre[]" id="Nombre" value="<?php echo $fila['Nombre'];?>"></td>
<td align="center">
<input type="text" name="Apellido[]" id="Apellido" value="<?php echo $fila['Apellido'];?>"></td>
<td align="center"><input type="text" name="Email[]" id="Email" value="<?php echo $fila['Email'];?>" /></td>
<?Php
}
?>
</tr>
<tr>
<td colspan="4" align="center"><input type="submit" name="Enviar" value="Enviar"/>
<?php
$Enviar=$_POST['Enviar'][$i];
$Nombre=$_POST['Nombre'][$i];
$Apellido=$_POST['Apellido'][$i];
$Email=$_POST['Email'][$i];
if($Enviar){
for($i=0;$i<$count;$i++){
$sql1="UPDATE $tabla SET Nombre='$Nombre', Apellido='$Apellido',Email='$Email' WHERE Id=$'Id'";
$result1=mysql_query($sql1);
}
}
if($result1>0) {
header("Location:modificar11.php");
}
mysql_close();
?></tr>
</table>
</form>