View Full Version : Why not?

11-17-2006, 07:01 PM
Hey there,
I've created a small piece of code to log you in and set the session variables with your info. Then when you go to another page, it will log you out, well its supposed to, but it doesn't. I've also made a debug page which will just show the $_SESSION variables so I know what's going on.

Heres the code:

} elseif($a == "logout") {
unset($_SESSION); // Supposedly logs me out
echo 'Logged out...<br><br>';
print_r($_SESSION); // Returns black
} elseif($a == "register") {

} elseif($a == "ticket") {

} elseif($a == "check") {

} elseif($a == "debug") {
echo '<strong><center>Debug Info</center></strong><br><br>';
print_r($_SESSION); // Returns will all my information here
} else {
echo '0 0x01';

Any ideas why it dont log me out?


11-17-2006, 07:06 PM
See this:


11-17-2006, 07:13 PM
Thanks mate! Works great :D