Ver Mensaje Individual
  #4 (permalink)  
Antiguo 06/04/2015, 09:24
superweb360
(Desactivado)
 
Fecha de Ingreso: abril-2015
Ubicación: España
Mensajes: 616
Antigüedad: 9 años, 1 mes
Puntos: 74
Respuesta: Dejar sesion abierta despues de hacer login mediante checkbox

prueba de cerrar la sesión de esta manera:


Código PHP:
Ver original
  1. <?php
  2. // Initialize the session.
  3. // If you are using session_name("something"), don't forget it now!
  4.  
  5. // Unset all of the session variables.
  6. $_SESSION = array();
  7.  
  8. // If it's desired to kill the session, also delete the session cookie.
  9. // Note: This will destroy the session, and not just the session data!
  10. if (ini_get("session.use_cookies")) {
  11.     $params = session_get_cookie_params();
  12.     setcookie(session_name(), '', time() - 42000,
  13.         $params["path"], $params["domain"],
  14.         $params["secure"], $params["httponly"]
  15.     );
  16. }
  17.  
  18. // Finally, destroy the session.
  19. ?>