How to implement the creation of a group of items and send via php multiple such groups?

I just need a concept how to properly implement this: when click on the "Add" button is added to select (program of study) and underneath the "Add" button that adds a input (it will be the name of the person) and can be added indefinitely. And also select points to add as much as possible. It turns out that each correspond to the select few inputo.
I can't seem to figure out how best to organize the structure of this unit and sending a post request to php through working with introduced in the form of data.
July 8th 19 at 16:33
2 answers
July 8th 19 at 16:35
What is there to think?
Each input your name or one name for all input the same value (e.g. all inputs with names - one name, with names such as - more...) and then on the server the data is in the array (even easier in my opinion).
July 8th 19 at 16:37
To use the input as an array would be best
Yes, I do. But how to specify that certain input corresponds to one select, and the other different?

Select 1
Select 2
-Инпут3 - carroll_Kohler73 commented on July 8th 19 at 16:40
miniven: well, if you send ajax it is possible in the handler, catch element class or data-attribute.

If I want to using php without Ajax then you can so name=inputname[select-id][] then in the backend will come a multidimensional array with defined keys. - Brenden.Gutkows commented on July 8th 19 at 16:43

Find more questions by tags CSSHTMLJavaScriptjQueryPHP