会话更改head.php的条件

i am currently working on my index.php, what i want to do is when the user logs in he will be redirected to index.php again but this time with a different head.php to store session of the user.

i have tried this one.

if(isset($_SESSION['isCustomer'])){
    include 'includes/customer.head.php';
    echo "hahaha";
}
else{
include 'includes/head.php';

}

and here is my checklogin.php

if($row['type'] == 'admin'){
            $_SESSION['isAdmin'] = true;
            header("location: admin/admin.php");
        } else if($row['type'] == 'customer'){
            $_SESSION['isCustomer'] = true;
            header("location: ../index.php");
        }

When you say "i have tried this one."

if(isset($_SESSION['isCustomer'])){
    include 'includes/customer.head.php';
    echo "hahaha";
}
else{
include 'includes/head.php';

}

I'm guessing it didn't work. Make sure you have

session_start(); 

at the top of the script. You're condition looks right.