Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/11/2012, 05:35
luisalberti
 
Fecha de Ingreso: septiembre-2011
Mensajes: 176
Antigüedad: 12 años, 7 meses
Puntos: 0
problema al actualizar desde formulario

Esto es solo un ejemplo, el tema que pasa es el siguiente cuando modifico cargo los datos en el formulario pero cuando voy a guardar no me pasa las variables.

Un Saludo , MUchas Gracias

Código PHP:
Ver original
  1. include_once("bd.php");
  2. $conn=abrirbd();
  3. $sql="select * from ciudades";
  4. $rs=mysql_query($sql);
  5. while($fila=mysql_fetch_array($rs))
  6. {
  7. echo"<tr>";
  8. echo"<td>".$fila1 = $fila["id_ciudades"]."</td>";
  9. echo"<td>".$fila2 = $fila["nombre"]."</td>";
  10. echo"<td>".$fila3 =$fila["poblacion"]."</td>";
  11. echo"<td>".$fila4 =$fila["circuito"]."</td>";
  12. echo"</tr>";
  13. }
  14. ?>
  15. r
  16.  
  17. <html>
  18. <head>
  19. </head>
  20. <body>
  21. <form method="post" action="modificar2.php">
  22. id_ciudades <INPUT type="text" name="id_ciudades" value="<?php echo $fila1 ?>"/><br><br>
  23. nombre <INPUT type="text" name="nombre" value="<?php echo $fila3 ?>"/><br><br>
  24. poblacion <INPUT type="text" name="poblacion" value="<?php echo $fila3 ?>"/><br><br>
  25. circuito <INPUT type="text" name="circuito" value="<?php echo $fila4 ?>"/><br><br>
  26. <INPUT type="submit" name="enviar" value=""/><br><br>
  27. <INPUT type="submit" name="enviar" value=""/><br><br>
  28. <a href="index.php">indice</a>
  29. </body>
  30. </html>

modificar2.php
Código PHP:
Ver original
  1. <html>
  2. <head>
  3. <title> historia de formula 1 </title>
  4. </head>
  5. <body>
  6. <?PHP
  7. echo $_POST["id_ciudades"];
  8. echo $_POST["nombre"];
  9. echo  $_POST["poblacion"];
  10. echo  $_POST["circuito"];
  11. echo $_POST["enviar"];
  12.  
  13. }
  14. ?>