How to create several records in only one dynamic form?

Posted by Fernando on Stack Overflow See other posts from Stack Overflow or by Fernando
Published on 2010-05-09T16:23:52Z Indexed on 2010/05/09 16:28 UTC
Read the original article Hit count: 173

Filed under:
|
|
|

Hi experts, please help me with a simple PHP doubt.

I have a simple form:

< form action="foo" > Person: < a href="javascript:addmore();">Add More < /form >

Every time the user clicks Add More two new input fields will be dynamically created using jQuery. This can be done several times in a same form.

< form action="foo" > Person:

< a href="javascript:addmore();">Add More < /form >

Each pair (name and last_name) should create on record in my db.

Two Questions: 1) What is the best option for input id? Appending a counter is the best option? 2) How can I handle it in the backend using php?

Let me know if you need more info.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about php

Related posts about form