session_start(); if(isset($_SESSION['userid'])){ if($_SESSION['type']=='a'){ header('location: associate/'); } else if ($_SESSION['type']=='m'){ header('location: manager/'); } } ?>