How to make this into a two-dimensional array, JS control, jquery, can be submitted to the background, the background to parse the two-dimensional array?? Tokyu
This is the front-end HTML code to write three modules, each module has a module ID, the module has a lot of sub-function check box, when you select a module, some modules under the sub-function submission time, the background receives only an array or JSON string, and then to parse the array or JSON, At the same time, the front desk has a character ID.
Database fields have mid roleid marks explain three fields below, mid and Roleid are many-to-many, composite primary key relationships, Mid module Id,roleid role id,marks function meta-codes under this module ( This is the value of the check box is added or the value of the operation is a constant, here does not care about the module check box value How to operate, anyway, is a constant, I ask the front end of the selection of those check box value after the use of JS or jquery how to control it, I think it is to select the check box to assign an array, and then submit the better, but I do not know how to write, there is a better solution to say, the best is the kind of code, I just get started PHP, ask the big God to plan????
------to solve the idea----------------------
Use a custom attribute for the child ID when clicked
Determine if the child ID has this custom attribute, and then put the value and ID of input that owns this custom attribute into an array ...
------to solve the idea----------------------
Test it yourself and you'll know.
------to solve the idea----------------------
Simulates one of the following
The code is as follows
[code=php]
Choose
[/code]
------to solve the idea----------------------
I don't know if it's LZ.