| Current Path : /home/copmadinaarea/thecopmadinaarea.org/reports/ |
| Current File : /home/copmadinaarea/thecopmadinaarea.org/reports/logout.php |
<?php
session_start();
require_once 'config/database.php';
require_once 'includes/functions.php';
// Log the logout action
if (isset($_SESSION['user_id'])) {
logAudit('LOGOUT', 'users', $_SESSION['user_id']);
}
// Destroy the session
session_unset();
session_destroy();
// Redirect to login page
header('Location: login.php?message=logged_out');
exit();
?>