Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ //includes files require_once __DIR__ . "/resources/require.php"; //use custom logout destination if set otherwise redirect to the index page if (isset($_SESSION["login"]["logout_destination"]["text"])){ $logout_destination = $_SESSION["login"]["logout_destination"]["text"]; } else { $logout_destination = PROJECT_PATH."/"; } //destroy session session_unset(); session_destroy(); //redirect the user to the logout page header("Location: ".$logout_destination); exit;