The front end is designed like this
Then click to add a summary and there will be one more line
# If this continues, you can have as many entries as you want. How can I use thinkphp to solve this problem of inserting into the database? Because it was fixed before, but now it is not fixed. I don’t know how to deal with this and insert it into the database. Thanks
Hello, how do I add database fields? Because the database fields are fixed, but now there are more and more input boxes on the front end. How to deal with this?
//Add data in batches
Thanks for the invitation, just organize it into a two-dimensional array and submit it as mentioned above
Based on your comment, it seems that the main table cannot be moved, then add a table,
For example, array('name'=>'name','email'=>'email') is the main table It is permanently saved. After saving, there will be an ID. You can save this ID, together with other newly added fields, to another table, and then query it in conjunction with the table when displaying.