Skip to content Skip to sidebar Skip to footer

Develop Membership System To Include Different Rolls

I have a basic membership system set up using MySQL database with 3 tables, user_id, user_name and user_password. my php code bellow is simple as I am new to php and will develop

Solution 1:

Well, you can easily add a field in your table, for example

level

and add a value, for example 1 (basic user) 2 (admin) 3 (global admin).

When there is an operation which can be done, for example, only by an admin, you just check it like this:

if ($user_level >= 2) {

echo'You can do this...';

}

Post a Comment for "Develop Membership System To Include Different Rolls"