Solved

Multi Level User Login System

Posted on 2011-03-01
3
1,428 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

696 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