base on my question above, I click the logout button at is redirect to the initial page index.php.
At the index.php, when I pressed the browser back button, it will display message:
"Undefined index: login_user in C:\inetpub\wwwroot\ebooking\pages\dashboard\admin\dashboard_admin.php on line 6"
when I once again press the back button, it will redirect back to index.php. Below is my code:
index.php
<?php
    include("config/configPDO.php");
    session_start();
    $msg = ""; 
    if(isset($_POST['submitBtnLogin'])) {
    $User_ID = trim($_POST['Email']);
    $email=explode('@',$User_ID);
    if (is_array($email)){
        $User_ID=$email[0];
    }
    $Pwd = trim($_POST['Pwd']);
    if($User_ID != "" && $Pwd != "") {
        $ldap_dn = "TOPPOP\\".$User_ID;
        $ldap_password = $Pwd;
        $ldap_con = ldap_connect("ldap://xxx.xx.xx.xx:xxx");
        ldap_set_option($ldap_con, LDAP_OPT_PROTOCOL_VERSION, 3);
        if(@ldap_bind($ldap_con,$ldap_dn,$ldap_password)){;
            try {
                $records = $conn->prepare("SELECT Email, Role_ID, Pwd FROM Staff WHERE User_ID = :User_ID ");
                $records->execute(
                    array(  
                    'User_ID'     =>    $User_ID,
                    )  
                );
                $results = $records->fetch(PDO::FETCH_ASSOC);
                $message = '';
                if($results && count($results) > 0 ){
                    $_SESSION['login_user'] = $results["Email"];
                    if($results["Role_ID"] == "2"){ 
                        header("location: pages/dashboard/admin/dashboard_admin.php");
                    }else if ($results["Role_ID"] == "3"){ 
                        header("location: pages/dashboard/super_admin/dashboard_super_admin.php");
                    }else if ($results["Role_ID"] == "1"){ 
                        header("location: pages/dashboard/normal_user/dashboard_normal_user.php");
                    }
                } else {
                    echo "
                    <script>alert('You're not authorized to use this system')</script>
                    <script>window.location = 'index.php'</script>
                    ";
                }
            } catch (PDOException $e) {
                echo "Error : ".$e->getMessage();
            }
        } else{ 
        echo "
        <script>alert('Invalid Email or Password')</script>
        <script>window.location = 'index.php'</script>
        ";
        }
    } else {
        $msg = "Both fields are required!";
    }
}
?>
dashboard_admin.php (contain logout)
<?php
require_once "../../../config/configPDO.php";
require_once "../../../config/check.php";
$Email = $_SESSION['login_user'];   //line 6
?>
check.php
<?php
session_start();
if(isset($_SESSION['login_user']) === false){
    header("Location: logout.php");
}
?>
logout.php
  <?php
     session_start();
     session_destroy();
     header("Location: ../index.php");
  ?>
 
     
     
    