Ver Mensaje Individual
  #10 (permalink)  
Antiguo 03/05/2006, 12:12
alfil_negro
 
Fecha de Ingreso: enero-2003
Ubicación: Aguascalientes, Aguascalientes
Mensajes: 191
Antigüedad: 21 años, 3 meses
Puntos: 1
ya visite la pagina que me indicas antes de poner el mensaje enterior, y ya probe de varias maneras pero no encuentro la solucion para hecharlo andar.

te pongo el texto y me comentas en que estoy mal, algunas cosas las notaras no como me indicas pero es que como te digo ya probe de varias formas

formulario1.php

Código PHP:
<?php session_start(); 
$_SESSION['formulario']=1
if (isset(
$_SESSION['variables']))
  { 
   
$variables=$_SESSION['variables']; 
   echo 
"error en el formulario" ;
  } else { 

   
$_SESSION['variables']=array(); 
   echo 
"si entro" ;
  } 
?>
<html>
<head>
<title>formulario 1</title>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta http-equiv="pragma" content="no-cache" />
</head>
<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" id="body">
<form action="valida_formulario1.php" method="post" >
  <table border="0" width="330" cellpadding="2" cellspacing="2" align="center" id="tbl_aluno">
    <tbody>
      <tr>
        <td align="left" colspan="3"><hr>
        </td>
      </tr>
      <tr>
        <td colspan="3" align="left"> </td>
      </tr>
      <tr>
        <td align="left" colspan="3"><font color="#666666" size="3" face="Arial"><b>Datos del coordinador responsable</b></font></td>
      </tr>
      <tr>
        <td height="20" colspan="3" valign="middle">&nbsp; </td>
      </tr>
      <tr>
        <td width="175" height="20" align="left" valign="middle" ><b> Instituci&oacute;n:</b></td>
        <td width="242" height="20" align="left" valign="middle" >
          <input maxlength="50" size="36" type="text" id="institucion_local2" name="institucion_local" value="<? echo $_SESSION['variables'?>"></td>
      </tr>
      <tr>
        <td height="20" align="left" valign="middle" ><b>Departamento:</b></td>
        <td height="20" align="left" valign="middle" >
          <input maxlength="50" size="36" type="text" id="dpto" name="dpto" value="<? echo $_SESSION['variables'?>">
        </td>
      </tr>
      <tr>
        <td colspan="3" valign="middle"><font color="#666666" size="3" face="Arial"> <a id="href_continuar">
          <input name="image" type="image" src="soicitud/btn_continuar.gif" alt="" width="92" height="20" border="0">
        </a></font></td>
      </tr>
    </tbody>
  </table>
</form>
</body>
</html>
valida_formulario1.php


Código PHP:
<?php session_start(); 
if (
$_SESSION['formulario']!=1)

            die (
"Acceso incorrecto .. no llega desde el form1"); 
            
// Si hay un error .. redireccionas a form1.php  
            
header ("Location: formulario1.php");
}else{

            if (empty(
$_POST['institucion_local']))
              { 
              
array_push($_SESSION['variables'],$_POST['dpto']);  
              
header ("Location: formulario1.php"); 
              exit(); 
              } 
            
session_start();
            
array_push($_SESSION['variables'],$_POST['institucion_local']);             

            echo 
$_SESSION['variables']['institucion_local']; 
            echo
"<br>";
            echo 
$_POST['institucion_local'];
            echo
"<br>";
            echo 
$_POST['dpto'];
            
//header ("Location: forma2.php"); 
    
}
?>

ayuda por favor con esto que ya me tiene
es un pequeño paso para ustedes pero un gran paso para la humanidad