title: Why HTML form isn't sending any data
body: <p>I am trying to get data with php, so here is my code:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;form action=&quot;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
  
          &lt;input type=&quot;file&quot; name=&quot;file&quot; required&gt;&lt;br&gt;
          &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;submit&quot;&gt;&lt;br&gt;
  
      &lt;/form&gt;
  
      &lt;?php
      
          print_r($_POST);
  
          if(isset($_POST['submit']))
          {
              print_r($_FILES);
          }
  
      ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>It always prints an empty array, meaning $_POST is always empty. Could you please help me</p>
  <p>Note: it does receive a data if you submit only the file (name is empty)</p>