Home > Net >  Select only specific ID or Users in Manager and managers2
Select only specific ID or Users in Manager and managers2

Time:10-07

Hi I am currently working on my php project.

which is I need to get the specific users/Managers approval only.

This is my code from my project, but the problem is all user can see the User's of my php.

$managers=$conn->query("SELECT * from `users` where type = 3");

$managers2=$conn->query("SELECT * from `users` where type = 3");

type = '3' this is the User and also there is an Manager that using my php.

type = '1' is my admin and type = '2' is the staff.

is there any option to choose only the specific user by choosing the table of "id"

enter image description here

CodePudding user response:

The question is unclear but i understand a little bit you can put a AND condition to your WHERE statement like this Where id = 1 AND type = 1.

If your talking about access of the page you can do a IF Else Statement and Throw them to different URL like if(type == 1){header('Location: admin.php')}

  • Related