I\'m trying to understand sessions and how some of the functions to end them work. I\'ve gone to different sites/and even here on SO and, well essentially, nothing is workin
You have to start a session in order to end a session. I recommend taking a look at... http://php.about.com/od/advancedphp/ss/php_sessions_3.htm
// you have to open the session to be able to modify or remove it
session_start();
// to change a variable, just overwrite it
$_SESSION['size']='large';
//you can remove a single variable in the session
unset($_SESSION['shape']);
// or this would remove all the variables in the session, but not the session itself
session_unset();
// this would destroy the session variables
session_destroy();
You are missing a session_start()
at the top of your logout page. It's trying to modify a session that doesn't exist!