Hi,
This has really stumped me and I'm going a little crazy. Thank you to anyone that can help.
I've recently moved over from a PC to a Mac at home but still use a PC at work and have found that on my Mac my logout script won't work?
I've put the code below and this is fine on the PC, am I missing something about the way cookies behave in Safari or on Mac?
This php script is called from a link and should go back to the index page where the check for isLoggedIn should fail and show the login form. However, it is behaving as if the user is still logged in and showing the first page a logged in user sees.
<?php
session_start();
if (session_unregister('loginid') == true && session_unregister('username')==true ) {
session_destroy();
header('Location: index.php');
} else {
unset($SESSION['loginid']);
unset($SESSION['username']);
session_destroy();
header('Location: index.php');
}
?>
Why is this - is it something in my script or should I be looking to the settings on the machine?