I’m making a login page well i’ve actually finished the login but how would i go about having the web page display diffren’t things based on a users privileges and how would i set the privileges in my mysql database? and then use them in my php code?
Share
I usually make a field in the
userstable calledadminor in this case maybeprivilege_level, then in your php, you define what values of that field correspond to what levels of privilege.EDIT (example):
Then, on pages where you want to check the privilege level you can use a switch or other control structure/design pattern to load content dynamically, ie: