I have two form fields "First name" and "Last name" I can also clone the two fields to add more users on one submit. I want each record to have it's own ID once inserted into the database. However I can't seen to get it to insert two values at once in a loop.
My form fields are
<input type="text" name="firstname_0" size="35" value="" />
<input type="text" name="lastname_0" size="35" value="" />
The name auto increments every time I want to add another user firstname_1, lastname_1 etc...
I would like to add 1 or unlimited users in one form submit.
Any help would be appreciated.
I tried using a foreach() and while but can't get the concept.