condition for session changing head.php -



condition for session changing head.php -

i working on index.php, want when user logs in redirected index.php 1 time again time different head.php store session of user.

i have tried one.

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

and here 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 "i have tried one."

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

i'm guessing didn't work. create sure have

session_start();

at top of script. you're status looks right.

php session

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -