<?php ob_start(); session_start(); $array_allow=array("Sales Admin" ,"Sales"); if(in_array($_SESSION['user_type'],$array_allow)) { $allow="Y"; } else { $allow="N"; } if($_SESSION['id']=="" || $allow=="N") { header("Location: index.php"); } else { echo""; } //print_r($_SESSION); /*$_SESSION['id']=$objectData['recNo']; $_SESSION['username']=$objectData['username']; $_SESSION['usertype']=$objectData['usertype']; header("Location: admin.php");*/ ?>