if (!in_array($_SESSION['UGradeID'], $permissions)) { true statement} <- what if this condition return false what will happen? just die the script u should put some to avoid bugs. ur script is to hard to understand. why u code it in this way. i respect it ofcourse. but i just criticizing it :D
