BR
asked on
restriction of entering a a page
Dear Experts,
I use Ray Paseur's great article PHP Client Registration, Login, Logout and Easy Access Control
https://www.experts-exchange.com/articles/2391/PHP-Client-Registration-Login-Logout-and-Easy-Access-Control.html
I have many tables and pages that I store data for my users. But not all the users should access inside pages.
Although all the users have to login to my website, some of them shouldn't be able to enter back office pages ( they don't even know the link of the page but I need to restrict entering it)
Some of the employees should be able to access some pages some of them should not.
I use this kind of if formula on the top of my page right after access contro function. $uid = access_control();
my if formula is:
But my user numbers are increasing so that I should find a better way to give people access or restriction on the restricted pages.
What do you suggest I should do?
I use Ray Paseur's great article PHP Client Registration, Login, Logout and Easy Access Control
https://www.experts-exchange.com/articles/2391/PHP-Client-Registration-Login-Logout-and-Easy-Access-Control.html
I have many tables and pages that I store data for my users. But not all the users should access inside pages.
Although all the users have to login to my website, some of them shouldn't be able to enter back office pages ( they don't even know the link of the page but I need to restrict entering it)
Some of the employees should be able to access some pages some of them should not.
I use this kind of if formula on the top of my page right after access contro function. $uid = access_control();
my if formula is:
if ($uid=='xxxxxx' or $uid=='ttttttt' or $uid=='ccccccc')
{}
else {
echo "<h3>Dear " . $uid. ' , you are not authorized to see this page </h3>';
die;
}
But my user numbers are increasing so that I should find a better way to give people access or restriction on the restricted pages.
What do you suggest I should do?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Both answers are perfect. Thank you very much.
You are welcome.
ASKER
I will read it carefully, You are the best.