title: Php is not properly recieving data that is in my form
body: <p>I'm using Ajax to send the values of my form to my php file and insert it in my data base, depending on the action of the button it will execute the url,
  in this case is insert_shirt.php, but It doesn't seem to be working because It doesn't send the data that is the form like as if the form were completely empty</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form method="post" id="form_shirt"&gt;
    ID:
    &lt;br&gt;
    &lt;input type="hidden" name="id_shirt" id="id_shirt" class="form-control"&gt; Name:
    &lt;br&gt;
    &lt;input type="text" name="name_shirt" id="name_shirt" class="form-control" required="required"&gt; Price:
    &lt;br&gt;
    &lt;input type="text" name="price_shirt" id="price_shirt" class="form-control" required="required"&gt;
  
    &lt;button id="insert_shirt" class="submit" name="btninsert"&gt;INSERT&lt;/button&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>$(document).ready(function() {
    $('.submit').on("click", function() {
      $.ajax({
        url: this.id + ".php",
        method: "POST",
        data: $('#form_shirt').serialize(),
        contentType: false,
        cache: false,
        processData: false,
        success: function(data) {
          $('#form_shirt')[0].reset();
          $('#table_shirt').html(data);
        }
      });
    });
  });
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>&lt;?php
  
  $connect = mysqli_connect("localhost", "root", "", "shirts");
  
   $output = '';
      $name_shirt = mysqli_real_escape_string($connect, $_POST["name_shirt"]);  
      $price_shirt = mysqli_real_escape_string($connect, $_POST["price_shirt"]);  
  
      $query = "INSERT into shirts ( name, price)
      VALUES ('$name_shirt','$price_shirt') ";
      if(mysqli_query($connect, $query))
      {
       $output .= '&lt;label class="text-success"&gt;Data Inserted&lt;/label&gt;';
       $select_query = "SELECT id_shirt, name, price FROM shirts";
       $result = mysqli_query($connect, $select_query);
       $output .= '
        &lt;table id="shirts" class="table table-bordered"&gt;  
                     &lt;thead&gt;
                      &lt;tr&gt;  
                          &lt;th&gt;ID&lt;/th&gt;
                          &lt;th&gt;NAME&lt;/th&gt;
                          &lt;th&gt;PRICE&lt;/th&gt;
                      &lt;/tr&gt;
  &lt;/thead&gt;
       ';
       while($row = mysqli_fetch_array($result))
       {
        $output .= '
         &lt;tr&gt;  
         &lt;tbody&gt;
                           &lt;td&gt;' . $row["id_shirt"] . '&lt;/td&gt;
                           &lt;td&gt;' . $row["name"] . '&lt;/td&gt;
                           &lt;td&gt;' . $row["price"] . '&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;/tbody&gt;
        ';
       }
       $output .= '&lt;/table&gt;';
      }
      echo $output;
  
  ?&gt;
  </code></pre>