title: $_FILES undefined index : file
body: <pre><code>&lt;?php
      echo $_FILES['file']['error'];
  ?&gt;
  
  &lt;form action="uploads.php" method = "POST"&gt;
      &lt;input  name="file" type="file" enctype="multipart/form-data"&gt;&lt;br&gt;
      &lt;input type="Submit" value="Submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am getting an <code>undefined index file</code> error for this code.</p>
  
  <p>What should I do?</p>
  
  <p>This is just the shortened version of the code that I am trying to implement. In the original code I have used <code>isset()</code> function. However in that case I am not getting any output! </p>