How can i post this type of inputs to php and insert him to mysql with mysqli
<tr>
<td>
<input type="text" name="fii[]">
<input type="text" name="foo[]">
<input type="text" name="faa[]">
</td>
<td>
<input type="text" name="fii[]">
<input type="text" name="foo[]">
<input type="text" name="faa[]">
</td>
</tr>
the structure of the table |fii|foo|faa|
This is the dynamic form creation for your problem.Then you can use a same way to get these values in php file
Add an index
I like to be specific so I can see it on the client side and then see the result index for index on the server side
So like Dragon stated in another comment, you'll go through your $_GET['fii'] etc. and insert into your database
pseudo code:
Note:
1) Below is the logic, Try with your coding method and fields
2) Edited: It will be work perfectly with
name="field1[]"
insteadname="field1['.$i.']"
. However If you want to edit the saved data,$i
can be replace with database id OR you need to pass an hidden input field with the database id<input type="hidden" name="database_id['.$unique_id.']">
in for loop. (is upto your logic and implementations)Form Page
your_action_page.php