title: Submit form with a button outside the form
body: <p>I have a form which I use a button outside the form to submit.
  Below is the code on how I submit the form with a button from outside the form. The code below should echo something on the page. But I don't know why my text wont echo.</p>
  
  <pre><code>    &lt;?php
      if(isset($_POST['partForm'])){
          echo "Test1";
      }
      if(isset($_POST['submitForm'])){
          echo "Test2";
      }
  ?&gt;
  
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;div&gt;
  &lt;h2&gt;Part&lt;/h2&gt;
  &lt;form method="post" enctype="multipart/form-data" name="partForm" id="partForm" action="submit_form_button_outside.php"&gt;
  SKU#: &lt;input type="text" name="sku"&gt;&lt;br&gt;
  Part: &lt;select name="categories"&gt;
  &lt;option value="volvo"&gt;Volvo&lt;/option&gt;
  &lt;option value="saab"&gt;Saab&lt;/option&gt;
  &lt;option value="fiat"&gt;Fiat&lt;/option&gt;
  &lt;option value="audi"&gt;Audi&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;
  
  Description: &lt;input type="text" name="part"&gt;&lt;br&gt;
  Quantity: &lt;input type="text" name="part"&gt;&lt;br&gt;
  Price: &lt;input type="text" name="part"&gt;&lt;br&gt;
  Select images: &lt;input type="file" name="img" multiple&gt;&lt;input type="submit" value="Upload"&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
      &lt;button type="submit" form="partForm" value="submitForm"&gt;Add Item&lt;/button&gt;
      &lt;!--&lt;button type="button" onclick="document.getElementById('partForm').submit();"&gt;Add Item&lt;/button&gt;--&gt;
      &lt;!--&lt;button type="button" onclick="document.forms['partForm'].submit(); return false"&gt;Add Item&lt;/button&gt; --&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>