Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/02/2014, 10:22
Avatar de xpapachox
xpapachox
 
Fecha de Ingreso: junio-2011
Mensajes: 77
Antigüedad: 12 años, 10 meses
Puntos: 12
Respuesta: Validación del lado del servidor

Supongamos tenemos 2 formularios.

Form1:

Código PHP:
$txt1="";
$txt2="";
if(ISSET(
$_GET['band'])){
   
$txt1=$_GET['txt1'];
   
$txt2=$_GET['txt2'];

Código HTML:
<form action="form2.php" method="post">       
       <input type="text" name="txt1" value="<?=$txt1; ?>" />
       <input type="text" name="txt2" value="<?=$txt2; ?>" />
</form> 


Form2:

Código PHP:
$txt1=$_POST['txt1'];
$txt2=$_POST['txt2'];

//Aca alguna validacion
.......
.....
//Y si hay algun error Retornas a la página inicial.

Header("Location:form1.php?txt1=$txt1&txt2=$txt2&band=1");exit();