Código PHP:
Ver original
<?php $host = "localhost"; $username = "root"; $password = ""; $db = "bdpractica"; $tabla = "test"; $sql = "SELECT * FROM $tabla"; ?> <table width="500" border="1" cellpadding="0"> <form name="form1" method="post" action="modificar11.php"> <tr> <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 ?> </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="submit" value="Enviar"/> <?php if($Enviar){ for($i=0;$i<$count;$i++){ $sql1="UPDATE $tabla SET Nombre='$Nombre[$i]', Apellido='$Apellido[$i]',Email='$Email[$i]' WHERE Id=$'Id[$i]'"; } } if($result1) { } ?> </tr> </table>
estos son los errores q me salen
Notice: Undefined variable: Enviar in C:\wamp\www\Validacion\pastel\modificar11.php on line 45
Notice: Undefined variable: result1 in C:\wamp\www\Validacion\pastel\modificar11.php on line 51