This is the modified data, multi-line, multi-column.
The text box inside how to design ah.
Each line has a name of the text box, how can I name him better, when I save, how to know is to save which row.
If I define the name text box, the name is, xingming, obviously there are multiple lines of name text box name is xingming, this is not a conflict ah. Psot can't identify which is which. It's kinda tangled.
Have a friend done it, give a plan. More Tangled.
Reply to discussion (solution)
Don't you have a saved button on each back? It's a click event, and then you add a suffix to that, and that's xingming1 xingming2.
Don't you have a saved button on each back? It's a click event, and then you add a suffix to that, and that's xingming1 xingming2.
This line, how do I know, when submitted, I clicked on which row of the Save button was submitted.
Use a single form per line
All parameters of each row are distinguished by the ID of the data or the unique field
Use a single form per line
It's a bit of a waste. If there are 100 lines, do I use 100 forms?
All parameters of each row are distinguished by the ID of the data or the unique field
Exactly how to do it, a little dizzy.
Now that you have a submit button on each line, where is a single form of each line wasted?
A 100-row form is a waste if it commits a single row of data?
A 100-row form is a waste if it commits a single row of data?
Oh! That's really the truth,
You first determine whether it is an Ajax commit or a form refresh commit
You use Ajax to submit, your data first field does not have an ID, you save the button to do a onclick=postdata ($id) event, the name, age, height of input name value: name_$id,age_$id,age_$ Weight, and then in the PostData function, according to the incoming $id parameter to obtain the value of 3 input, and then submit
It was written in a wrong place, and age_$weight should be weight_$id.
You first determine whether it is an Ajax commit or a form refresh commit
Ajax submissions, it's estimated that you're going to use that method. Multiple forms.
It seems like a form is OK. Pass a parameter to JS, in the JS inside in processing a bit, in commit.
Just lazy, with post refresh submitted. Use multiple forms. Ha ha