Jump to content


Photo

sessions logout.


  • Please log in to reply
No replies to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 03 October 2006 - 01:15 PM

currently, my logout.php is

<?

session_start();

if(empty($_SESSION['MembersID']))
{
 
header("location: http://www.allinthis...ndex/index.php");

}

session_start();
session_unset();
session_unregister();
session_destroy();

header("location: http://www.allinthis...ndex/index.php");

?>

should i change this or is this ok, as it does logout, but i have seen other things in other logout.php's like exit;

and

session_unregister('wat ever here');


<?

session_start();

if(empty($_SESSION['MembersID']))
{
 
header("location: http://www.allinthis...ndex/index.php");

exit;

}
else
{
 
session_unset('MembersID');
session_unregister('MembersID');
session_destroy('MembersID');

header("location: http://www.allinthis...ndex/index.php");

exit;

}

?>

thats what i was thinking i should change to...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users