Solved

Multi Level User Login System

Posted on 2011-03-01
3
1,417 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP populating an array. 4 25
hasing a url 16 28
mysqli insert query problems 4 22
Add email address from a web page to outlook 2010 contacts ? 8 28
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
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 dynamically set the form action using jQuery.

803 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