Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/04/2015, 09:48
mensajeescrito
 
Fecha de Ingreso: mayo-2012
Mensajes: 760
Antigüedad: 12 años
Puntos: 5
Respuesta: Dejar sesion abierta despues de hacer login mediante checkbox

No termino de entender muy bien el codigo que me pones:

Lo he implementado de esta manera pero sigue sin funcionar:

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


entiendo que $_SESSION =array(); lo que hace es meter en el array todos los valores de las variables.

despues el contenido del if se me hace dificil entenderlo y aplicarlo.

sobre todo esta linea

"if (ini_get("session.use_cookies")) {"


y para variar no me funciona, estoy a las puertas de conseguir hacer la gracia completa pero se resiste