lets see
-create 1 more column at your users table with name lvl
To be honest you dont need a new table with lvl access if you know that you will have 1-5 lvls so your combo lvl dont need to be dynamic
And now lets say that users = 1, admins =2, Site creator(you) = 3
-use only 1 form for registration
-Create a .php page that can only see lvl 2 and 3
-create a set.php that will set the lvls for the users
the 1st page with result all your users that have reg at your database and anyone will have a link
Code: Select all
<a href=set.php?id=<?php echo $id_username?>Username</a>
also at that site you will have a
combobox with options 1-2-3
and a submit button
when you submit set.php will get the username id like set.php?id=1
and the value 1 , 2 ,or 3 or more via $_GET['']; method
and your query will be the update set smthing where id = '1'
So know Your 1st admin can control the users.also you can
when you will work with session "im not playing expert with that i dont have work a lot with sessions."
you will see that if the username that is loged in at the moment is set you will get with a query the lvl from the database and
you will make your conditions as you like.
Also if yyou wanna make smthing that for example
if the user can be a admin if he post more than 5000 posts you will update his data with lvl 2.
i hope that i helped a litle