title: Remove specific added fields in php form
body: <p>i have a form that can create fields, but how do i remove the added fields from the form that i created? Or even remove specific fields ? Sorry, im kind of new to this.
  If possible, is there a way to remove just one row of the field i added with a cross button beside it or something?</p>
  
  <p>Form</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  function addTextArea(){
  var div = document.getElementById('name');
  div.innerHTML += "&lt;input type='text' name='name[]' value='' /&gt;";
  div.innerHTML += "\n&lt;br /&gt;";
  var div = document.getElementById('quantity');
  div.innerHTML += "&lt;input type='text' name='quantity[]' value ='' /&gt;";
  div.innerHTML += "\n&lt;br /&gt;";
  var div = document.getElementById('amount');
  div.innerHTML += "&lt;input type='text' name='amount[]'  value =''/&gt;";
  div.innerHTML += "\n&lt;br /&gt;";
  }
  
  &lt;/script&gt;
  
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;form method="POST" action="confirm_invoice.php" &gt;
  &lt;?php
  echo "&lt;table border='2'&gt;\n"; 
  echo "&lt;tr&gt;\n"; 
  echo "&lt;th&gt;Description&lt;/th&gt;\n"; 
  echo "&lt;th&gt;Quantity&lt;/th&gt;\n"; 
  echo "&lt;th&gt;Amount($)&lt;/th&gt;\n";
   echo "&lt;/tr&gt;"; 
  
   echo "&lt;tr&gt;";
   echo "&lt;td&gt;"?&gt;&lt;input type='text' size="50" name='name[]' value='Examination and Consultation' readonly/&gt;&lt;?php "&lt;/td&gt;";
   echo "&lt;td&gt;"?&gt;&lt;input type='text' size="50" name='quantity[]' value='' /&gt;&lt;?php "&lt;/td&gt;";
   echo "&lt;td&gt;"?&gt;&lt;input type='text' size="50" name='amount[]' value='' /&gt;&lt;?php "&lt;/td&gt;";
   echo "&lt;/tr&gt;";
  
  echo "&lt;tr&gt;"; 
   echo "&lt;td&gt;"?&gt;&lt;div id="name"&gt;&lt;/div&gt; &lt;?php "&lt;/td&gt;"; 
   echo "&lt;td&gt;"?&gt;&lt;div id="quantity"&gt;&lt;/div&gt; &lt;?php "&lt;/td&gt;"; 
   echo "&lt;td&gt;"?&gt;&lt;div id="amount"&gt;&lt;/div&gt; &lt;?php "&lt;/td&gt;"; 
   echo "&lt;/tr&gt;";
   ?&gt;
   &lt;br /&gt;
  &lt;input type="button" value="Add Description" onClick="addTextArea();"&gt; &amp;nbsp;
  &lt;input type="submit" name="submit" value="submit"&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>