Solved

Multi Level User Login System

Posted on 2011-03-01
3
1,419 Views
Last Modified: 2012-05-11
Hi,

I have an idea on a multi-level user login system, where users/groups could be assigned permissions to access certain pages. This will be a add-on to a existing system.

I have attached a screen-shot of my idea. The idea is that permissions can be auto assigned by clicking different check boxes and clicking a update button.

Any code snippets/ links or ideas would be greatly appreciated.

Thanks in advance.
idea.jpg
0
Comment
Question by:abdulv
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
wwwdeveloper2 earned 500 total points
ID: 35014049
This is the database i would setup

user_table
username
password

group_table
group_id
group_name

The "bridge" table that will allow a user to be in multiple groups
user_access_table
group_id (fk to group_table)
username (fk to user_table)

Example data:
user_table
jsmith password1
jdoe password2
bdalton password34

group_table
1 Finance
2 Sales team
3 Human Resources

user_access_table
3 jdoe
3 jdoe
1 jsmith
2 bdalton
1 bdalton
3 bdalton

When you are creating your example gui with the check boxes, pull the group names and ids from the group_table - Your checkbox value should equal the id.

When you do your insert just insert the username and group_id into the user_access_table


Let me know what questions you have.

0
 
LVL 3

Expert Comment

by:wwwdeveloper2
ID: 35014055
Sorry for the typo in the user_access_table example data.  jdoe should not be in group 3 two times.

user_access_table
3 jdoe
1 jdoe
1 jsmith
2 bdalton
1 bdalton
3 bdalton
0
 

Author Closing Comment

by:abdulv
ID: 35043902
Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question