Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/08/2012, 11:08
Avatar de informacionsys
informacionsys
 
Fecha de Ingreso: mayo-2011
Ubicación: Bogota D.C
Mensajes: 793
Antigüedad: 13 años
Puntos: 76
Respuesta: como mantener activa la session en php

session_Start debe ser la primer linea del archivo

Código PHP:
Ver original
  1. //VALIDACION  
  2. if ($_POST["usuario"]=="admo" && $_POST["clave"]=="hello")
  3. {  
  4. //VALIDACION CORRECTA, ENVIO A INDEX.PHP  
  5. if (!isset($_SESSION["autentificado"])) {
  6.     $_SESSION["autentificado"]= "SI";  
  7.      
  8. }
  9.  
  10.  
  11. include '../../_lecorps/es/admo_profiles_sites.php';
  12. }else
  13. {  
  14.  
  15. //VALIDACION ERRONEA, ENVIO A LOGIN3.PHP  
  16. echo "<h1>ERROR !</h1>
  17. <a href='index.php?changePage=admin'>login</a>";  
  18.  
  19. }