0

System Page

This is my system page which is in form and after saving the form so in server side how can I handle permissions one by one?

db Table

This is my db-table structure according that how can I handle that logic?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

0

You need another table that indexes the SEQUENCES (from the systems page). Do you have it? If not, create table SEQUENCES:

id | name | category | description
1 | Select File | Archiving Service | user can select a file...
2 | Search Files | Archiving Service | user can .....

Create a PHP processing file that: gets user form form and finds him in the database; gets user's permissions from the form and stores them in the db with the ID from the SEQUENCES table

(example: in the CREATE column put all the id's from the SEQUENCES table, depending on the checked checkboxes)

user_right_id | create | modify | ....
user_1 | 1,2 | 1 | ...

(user_1 can create: select files, search files)

(user_1 can modify: select files)

verjas
  • 1,793
  • 1
  • 15
  • 18
  • I'm not sure what you are asking here. Are you asking for the code to process the checkboxes and insert the correct values in the database? – verjas Sep 28 '16 at 19:29
  • If you need to learn how to process checkboxes from HTML in PHP, start with this guide: [guide about checkbox & php](http://www.html-form-guide.com/php-form/php-form-checkbox.html) or this one: [stackoverflow answer](http://stackoverflow.com/questions/4554758/how-to-read-if-a-checkbox-is-checked-in-php) – verjas Sep 29 '16 at 07:26