G
Guest
Greetings! I have a table that contains all of the function
permissions within a given application. These functions are different
sections of a site and each has its own permissions (READ, WRITE,
UPDATE, DELETE) which are controlled by a web frontend and the table
records are manipulated to control the permissions.
Example:
The Press Release section record would look like this:
Username: John Doe
Function Name: Press Release
Read: 1
Write: 0
Update: 1
Delete: 0
....that would be one record. Another record would be:
Username: Jane Doe
Function Name: Online Seminars
Read: 1
Write: 1
Update: 1
Delete: 0
So, let's say I want to add a new user named 'John Smith' and I want
to assign all of his permissions. I want to pull all of the functions
(6 in total) and then I insert a new record for each function from the
cumulative form collection. Here's what the interface for adding a new
user would look like in text (Permissions will be READ, WRITE, UPDATE,
DELETE in that order from left to right)
User: John Smith
Press Releases, 1, 0, 1, 0
Online Seminars, 1, 1, 0, 1
eCommerce, 1, 0, 0, 1
Support, 1, 1, 1, 1
I have all of the 1's and 0's denoted in my interface in check boxes
under each respective permission heading.
My question is, how do I submit all this data in a form but yet still
write 4 INDIVIDUAL records to the database? i.e. I want to write 1
record for Press Releases, 1 for Online Seminars, 1 for eCommerce, and
1 for Support. How do I break up the form collection to write 4
individual records??? Each one has a unique Function ID so I can
individually identify them, but I don't know how to parse the form
collection to create 4 different records. Then, in addition, how do I
loop through 4 records to make each of them insert into the database??
I know this thread is incredibly long but if anyone could offer me any
help at all (please submit code examples) I would really appreciate
it.
Thanks in Advance!!!
permissions within a given application. These functions are different
sections of a site and each has its own permissions (READ, WRITE,
UPDATE, DELETE) which are controlled by a web frontend and the table
records are manipulated to control the permissions.
Example:
The Press Release section record would look like this:
Username: John Doe
Function Name: Press Release
Read: 1
Write: 0
Update: 1
Delete: 0
....that would be one record. Another record would be:
Username: Jane Doe
Function Name: Online Seminars
Read: 1
Write: 1
Update: 1
Delete: 0
So, let's say I want to add a new user named 'John Smith' and I want
to assign all of his permissions. I want to pull all of the functions
(6 in total) and then I insert a new record for each function from the
cumulative form collection. Here's what the interface for adding a new
user would look like in text (Permissions will be READ, WRITE, UPDATE,
DELETE in that order from left to right)
User: John Smith
Press Releases, 1, 0, 1, 0
Online Seminars, 1, 1, 0, 1
eCommerce, 1, 0, 0, 1
Support, 1, 1, 1, 1
I have all of the 1's and 0's denoted in my interface in check boxes
under each respective permission heading.
My question is, how do I submit all this data in a form but yet still
write 4 INDIVIDUAL records to the database? i.e. I want to write 1
record for Press Releases, 1 for Online Seminars, 1 for eCommerce, and
1 for Support. How do I break up the form collection to write 4
individual records??? Each one has a unique Function ID so I can
individually identify them, but I don't know how to parse the form
collection to create 4 different records. Then, in addition, how do I
loop through 4 records to make each of them insert into the database??
I know this thread is incredibly long but if anyone could offer me any
help at all (please submit code examples) I would really appreciate
it.
Thanks in Advance!!!