<?php
// logout.php
echo '
<script>
if (confirm("Are you sure you want to logout?")) {
    window.location.href = "logout_action.php";
} else {
    window.history.back(); // Go back to the previous page
}
</script>
';
?>
