Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/11/2011, 04:49
Arkaitz
 
Fecha de Ingreso: agosto-2011
Ubicación: España
Mensajes: 445
Antigüedad: 12 años, 8 meses
Puntos: 89
Respuesta: formulario de varias páginas..

Primera parte:

Código HTML:
Ver original
  1. </head>
  2. <form action="formulario2.php" method="get">
  3. Nombre: <input type="text" name="nombre"><br />
  4. Apellido: <input type="text" name="apellido"><br />
  5. <input type="submit" value="submit">
  6. </form>
  7. </body>
  8. </html>

Segunda parte del formulario:

Código PHP:
Ver original
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <form action="file.php" method="get">
  6. <? $nombre = $_GET['nombre'];
  7. $apellido = $_GET['apellido'];
  8. ?>
  9. <input type="hidden" name="nombre" value="<? echo $nombre;?>">
  10. <input type="hidden" name="apellido" value="<? echo $apellido;?>">
  11. Edad: <input type="text" name="edad"><br />
  12. <input type="submit" value="submit">
  13. </form>
  14. </body>
  15. </html>

Archivo que añade a la base de datos, aunque en mi ejemplo sólo muestra los datos de ambos formularios:

Código PHP:
Ver original
  1. <?
  2. echo $_GET['nombre'] .'<br />';
  3. echo $_GET['apellido'] .'<br />';
  4. echo $_GET['edad'];
  5. ?>