php pages restrictions, how to make it work -
below admin pannel code
<?php session_start(); if (!isset($_session['username'])) { header("location: login.php"); } if (isset($_session['username'])&& $_session['status']) { include('adminnav.php'); } ?>
and usernav bar
<?php session_start(); if (!isset($_session['username'])&& $_session['status']) { header("location: login.php"); } if (isset($_session['username'])&& $_session['status']) { $_session['status']; header("location: usernav.php"); } ?>
i have same interface admin , user login , when log in system user profile user can assess admin pages e.g. remove user etc, wanna know how restrict user page , admin user can access admin page.
Comments
Post a Comment