...

View Full Version : Why not?



NeoPuma
11-17-2006, 06: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?

thanks

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

http://us2.php.net/function.session-destroy

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum