<?php
session_start();
?>
<!DOCTYPE html>
<html>
<body>

<?php
// remove all session variables
session_unset();

// destroy the session
session_destroy();


     // Display the alert box 
        echo '<script>alert("You have successfully logged out.")</script>';
        
        echo ("<script LANGUAGE='JavaScript'>
    
    window.location.href='/index.php';
    </script>");


?>

</body>
</html>