I have been working on a php login system which is basically finished but needs one thing cleaning up. When the session is created/registered, a cookie is created. And according to firefox, the cookie will expire when the session ends. However, the session ends (according the the rest of my php scripts) and the cookie is still there. Below is the php code I use to end the session.
<?
{
session_set_cookie_params(0);
session_start();
session_destroy();
//setcookie("PHPSESSID","",time()-3600);
}
//And the rest doesn't relate to logging out
So when the logout button is pressed, the user is sent to a page with that code at the very beginning of the page. And as you can see in my code above, I have tried with and without the setcookie code with many different combinations between the brackets.
Can anybody see where I am going wrong because I have read all of the manuals which relate to each of these scripts. Any help would be appreciated.
Thanks