So I got a button with name="logout". Am I missing something here?
if (isset($_POST['logout'])) { session_unset($_SESSION['CurrentUser']); session_destroy(); echo 'you have been logged out.'; }