title: Dynamically add/remove new input to form
body: <p>So I am a beginner and as the title says I want to be able to; on the click of a button, allow the user to add another input field to my form. I would also like to be able to remove this.</p>
  
  <p>The use of the form is adding students to a student group, which I will then be storing in my database.</p>
  
  <p>my form example:</p>
  
  <pre><code>&lt;form name="addstudents" id="addstudents" method="post" action="add_students.php"&gt;
  &lt;table&gt;&lt;tr&gt;&lt;td&gt;Student:&lt;/td&gt;&lt;td&gt;
  &lt;input type='text' name="1" size='20'&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="button" id="add" value="+"&gt;    
  &lt;/td&gt;&lt;td&gt;&lt;input type="button" id="remove" value="-"&gt;&lt;/td&gt;
  &lt;/table&gt;&lt;/form&gt;
  </code></pre>
  
  <p>However from what I have been looking at there are different suggestions such as using a clone() function or Jquery appendto().</p>
  
  <p>which is the best method for doing so?</p>
  
  <p>thanks</p>