Jump to content

[SOLVED] isset session


shergold

Recommended Posts

Hey guys, could anyone please tell me whats wrong with the following? it just keeps redirecting to the login page even when the session is set and isnt destroying the session:

 

if (isset($_SESSION['user']))
{
session_start();
session_destroy();
header("location: /login.php?logout=true"); 
exit;
}
else
{
header("location: /login.php"); 
}
?>

 

Thanks,

shergold.

Link to comment
https://forums.phpfreaks.com/topic/165838-solved-isset-session/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.