<?php session_start(); if ( !empty($_SESSION["uid"]) ) { $Typeofuser = substr($_SESSION["pid"], 23 , 1) ; } else { header("Location: admin.htm") ; } ?>