If I create a link (as below) to log out a user I understand that there must be a session_start();
Do I have to change any of the unset $_SESSION settings?
Thanks
Do I have to change any of the unset $_SESSION settings?
Code:
<?php
// *** Logout the current user.
$logoutGoTo = "/interview/logout.htm";
session_start();
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
if ($logoutGoTo != "") {header("Location: $logoutGoTo");
session_unregister('MM_Username');
session_unregister('MM_UserGroup');
exit;
}
?>
Thanks