title: How to add a new textfield on clicking a button?
body: <p>I'm trying to insert certain sentences to MySQL database using PHP. But the design of the field is such a way that it shows only one field and a <code>[add]</code> button to insert a new textfield. So depending on the user needs, the number of textfields varies. </p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;h5&gt;LEARNING GOALS&lt;/h5&gt;
      &lt;div style="display:table; width:100%;"&gt;
        &lt;div style="display:table-row;"&gt;
          &lt;div style="display:table-cell;"&gt;
             &lt;input class="text-field" name="goal" type="text" placeholder="Goals*" style="width:100%"&gt;
          &lt;/div&gt;
          &lt;div style="display:table-cell; vertical-align:middle;width:65px;"&gt;
             &lt;input class="add-field-btn" type="button" value="+" style="width:65px;"&gt;&lt;/div&gt;
          &lt;/div&gt;
       &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>How can I add a new textfiled and assign name value and when I click on the submit button, to save all the textfield values into the database?</p>