I am creating a form containing dynamic content.
For example, the Form has a text box for Paper_Name and a text box for Paper_Link. A user can add up to ten paper names and paper references.
The identifier for each paper name and paper link is as follows:
papername01, paperlink01, ..., papername10, paperlink10.
These identifiers are dynamically generated by JavaScript. In other words, if the user does not click the Add Paper button and does not submit the form, the only field that will be received by the server is paperlink01 and papername01.
Now the question is what is better to use to create a PHP server script to process the submitted form content.
Yes, the question is related to the server and the client. I would like to learn the best practices and change my client accordingly. Please help and thanks.
The design of the form is as follows:
<div id="divDummy001">
<div id="paperTitle001Fld">
<label for="papertitle001">Title of Paper 001</label>
<div>
<input type="text" size="16" value="" id="papertitle001" name="papertitle001"/>
</div>
</div>
<div id="paperURL001Fld">
<label for="paperurl001">Paper Link 001</label>
<div>
<input type="text" size="96" value="" id="paperurl001" name="paperurl001"/>
</div>
</div>
</div>
When the user clicks the "Add" button, a new div will be created, with the only difference being that the identifier will be increased by 1.
source
share