title: Submit multiple form with one button into database
body: <p>im trying to insert data into database with two different form into two different tables with single button.
  Both Form are in same page.</p>
  <p><strong>Form-1 (inserts data in table-1)</strong></p>
  <pre><code>if(isset($_POST['form_1'])){
  Insert Query with condition
  }
  
  &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
     Different field for  requried for database field entry
      &lt;input type=&quot;submit&quot; value=&quot;Publish&quot; name=&quot;form_1&quot;&gt;
  &lt;/form&gt;
  </code></pre>
  <p><strong>Form-2 (inserts data in table-2)</strong></p>
  <pre><code>if(isset($_POST['form_2'])){
  Insert Query with condition
  }
  
  &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
     Different field for  requried for database field entry
      &lt;input type=&quot;submit&quot; value=&quot;Publish&quot; name=&quot;form_2&quot;&gt;
  &lt;/form&gt;
  </code></pre>
  <p>As we can see, i have used post method for form submission, it insert user input data into database with:</p>
  <blockquote>
  <p>isset(isset($_POST[‘submit name’]))</p>
  </blockquote>
  <p>i have used different submit button for inserting data, <strong>i want use single button to insert user input into database which table are different</strong></p>
  <p>How can i use single button to submit the data to two different table</p>