What is a better practice to handle dynamic form content?
<p>I design a form that contains dynamic contents.</p>

<p>For example,
The form has a textfield for Paper_Name and a textfield for Paper_Link.
The user can add up to ten paper names and paper links.</p>

<p>The id for each paper name and paper link is as follows:</p>

<p>papername01, paperlink01, ..., papername10, paperlink10.</p>

<p>Those ids are dynamically created by JavaScript. In other words, if the user doesn't click Add Paper button and submit the form, the only field that will be received by the server is paperlink01, and papername01.</p>

<p>Now, the question what is a better practice to design the server PHP script to handle those submitted form content.</p>

<p>1> Use aJax form plugin?
2> Use regular form submission and iterate through all variables and see whether any of them is set?
3> use JSON data format?</p>

<p>Yes, the question is related to both server and client. I would like to know the best practice and change my client accordingly.
Please help and thank you</p>

<p>The form design looks like the following:
    &lt; div id="divDummy001">
     &lt; div id="paperTitle001Fld">
      &lt; label for="papertitle001">Title of Paper 001&lt; /label >
      &lt; div>
       &lt; input type="text" size="16" value="" id="papertitle001" name="papertitle001" />
      &lt; /div >
     &lt; /div ></p>

<pre><code> &lt; div id="paperURL001Fld" &gt;
  &lt; label for="paperurl001"&gt;Paper Link 001&lt; /label &gt;
  &lt; div&gt;
   &lt; input type="text" size="96" value="" id="paperurl001" name="paperurl001" /&gt;
   &lt; /div &gt;
 &lt; /div &gt;
&lt; /div &gt;
</code></pre>

<p>When the user clicks Add button, a new div will be created with the only difference is that the ID will be increased by 1.</p>
