Session variables return completely after unsetting.
- by RemiX
I have a script that should log the user out of the site. It unsets all $_SESSION and $_COOKIE variables related to the login data of the user. But somehow, it seems impossible to log out. I checked the $_SESSION array at the end of the logout script, and at the beginning of each page. At the end of the logout script it says 'array()', but when I click the home button - or any link on the site - the full session data is back again and I don't know where it comes from. This is how I try to unset the session data:
unset($_SESSION);
unset($_COOKIE["usid"]);
unset($_COOKIE["pw"]);
unset($_COOKIE["adm"]); -- I don't know how to put it on different lines, but it's not that hard to read.
Why do these data keep coming back?!