The form buttons should include <input type="submit" Value="save and New" /> and <input type="submit"/>.
So I want to save a record and should be able to add a new record when the “save and New” button is clicked.
Finally all records (2 or 3…5 etc.) should be added to the database when the submit button is clicked.
Inserting multiple rows into the database is simple.
Say you have a table called
userswith columnsid,nameandemail– if you wish to insert 3 records at the same time, you’d just do something like this:…Ad nauseum, if you want another row of data to be added in a single query, then simply add another in brackets as the other two.
On a side note, do ensure to sanitize your data, lest you become a victim of SQL injection.