/** * Logout function. **/ function logout_user($echo = false, $redirect = 'index.php') { $msg = 'You have been logged out.'; SESSION::destroy(); if ($echo) { echo $msg; } if ($redirect) { redirect($redirect); } }
<?php include "codeheader.php"; include $incdir . "db_verbinden.php"; include $incdir . "session.php"; SESSION::destroy(); header("Location: ./index.php"); exit;
public function logout() { SESSION::destroy(); }