Hi all, first post here, and my problem is cookie related.
I have downloaded a login system from here
The login and all features work fine, until I try to log off, nothing happens, and registered person stays, and the form does not reset.
I assumed it should work as is, and have tried to resolve problem myself with no luck.
Below is the php i think might need changing etc.
session_name('tzLogin');
// Starting the session
session_set_cookie_params(2*7*24*60*60);
// Making the cookie live for 2 weeks
session_start();
if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe'])
{
// If you are logged in, but you don't have the tzRemember cookie (browser restart)
// and you have not checked the rememberMe checkbox:
$_SESSION = array();
session_destroy();
// Destroy the session
}
if(isset($_GET['logoff']))
{
$_SESSION = array();
session_destroy();
header("Location: index.php");
exit;
}
There is plenty more if you need to see I can post.
If anyone can help me out I would really appreciate it.
Cheers
Paul