Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/11/2009, 15:02
helacer
 
Fecha de Ingreso: mayo-2006
Ubicación: Bogotá
Mensajes: 2.061
Antigüedad: 18 años, 8 meses
Puntos: 50
Respuesta: pasar datos de un formulario a otro en la misma pagina

mmm ok,,,, prueba con esto:

Código PHP:
<?php 
error_reporting
(E_ALL E_NOTICE); 
session_start(); 
$campo1=$_POST['campo1']; 
$campo2=$_POST['campo2']; 
?> 

<div> 
<form name="form2" target="_self" action="<?php $_SERVER["PHP_SELF"]; ?>" method="POST"> 
Segundo formulario hacia SELF target Self<br> 

campo 1:<input type="text" name="campo1" value="<?php echo $campo1?>"><br> 
Campo 2:<input type="text" name="campo2" value="<?php echo $campo2;?>"><br> 
<input type="submit" name ="Submit2"> 

</form> 
</div> 
<form name="form1" target="_blank" action="combos.php" method="POST"> 
Primer formulario hacia combos.php Target blank <br>
<input type="hidden" name="campo1" value="<?php echo $campo1?>" />
<input type="hidden" name="campo2" value="<?php echo $campo2?>" />
campo 3:<input type="text" name="campo3" value=""><br><br> 
Campo 4:<input type="text" name="campo4" value=""><br> 
<input type="submit" name ="Submit"> 
</form>