Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/11/2012, 05:25
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

[/HIGHLIGHT]
include_once("bd.php");
$conn=abrirbd();
$sql="select * from ciudades";
$rs=mysql_query($sql);
while($fila=mysql_fetch_array($rs))
{
echo"<tr>";
echo"<td>".$fila1 = $fila["id_ciudades"]."</td>";
echo"<td>".$fila2 = $fila["nombre"]."</td>";
echo"<td>".$fila3 =$fila["poblacion"]."</td>";
echo"<td>".$fila4 =$fila["circuito"]."</td>";
echo"</tr>";
}
?>
r

<html>
<head>
</head>
<body>
<form method="post" action="modificar2.php">
id_ciudades <INPUT type="text" name="id_ciudades" value="<?php echo $fila1 ?>"/><br><br>
nombre <INPUT type="text" name="nombre" value="<?php echo $fila3 ?>"/><br><br>
poblacion <INPUT type="text" name="poblacion" value="<?php echo $fila3 ?>"/><br><br>
circuito <INPUT type="text" name="circuito" value="<?php echo $fila4 ?>"/><br><br>
<INPUT type="submit" name="enviar" value=""/><br><br>
<INPUT type="submit" name="enviar" value=""/><br><br>
<a href="index.php">indice</a>
</body>
</html>[HIGHLIGHT="PHP"]

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. ?>