Jump to content

Login's


ded

Recommended Posts

the best way to do this (and the most complicated) is to have groups with permissions.

 

You have 3 table: members, groups, permissions.

 

Members table set up as so: memberID | username | password | groupID

groups: groupID | name | description

permissions: permissionID | groupID | permission | access

 

For each of your members you assign a group to them. Ex: Admin, Registered, Guest

 

Scenario: You have a page: secretpage.php. You want only Admin and Registered members to see.

 

In the permissions table you set up something like this:

permissionID | groupID | permission | access
1 | 1 | secretpage | 1 <-- can view 
2 | 2 | secretpage | 1 <-- can view
3 | 3 | secretpage | 0 <-- can't view

 

If you want further explanation, i can give you some.

Link to comment
https://forums.phpfreaks.com/topic/135657-logins/#findComment-707422
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.