title: Form not passing file/picture through submit
body: <p>I'm working with php/html5 and i'm attempting to upload a file, but <code>$_FILES['picture']</code> never seems to contain anything. I've been through a lot of posts and looked for common fixes, but none of them seem to work, firstly, the code;</p>
  
  <p>Form;</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" action="decodeQR.php" method="post"&gt;
    &lt;input type="hidden" name="MAX_FILE_SIZE" value="30000000" /&gt;
    &lt;input type="file" name="picture" id="picture" value="picture" accept="picture/*" capture&gt;
    &lt;input type="submit" value="Upload"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>decodeQR.php;</p>
  
  <pre><code>&lt;?php
  include 'header.php';
  
  
  $upload_status = FALSE;
  if(isset($_FILES['picture']))
  {
      echo 'picture set &lt;br&gt;';
  }
  else
  {
      echo 'picture not set &lt;br&gt;';
  }
  
  if ($_FILES["file"]["error"] &gt; 0)
    {
    echo "Error: " . $_FILES["file"]["error"] . "&lt;br&gt;";
    }
  
  if (isset($_FILES['picture']) &amp;&amp; file_exists($_FILES['picture']['tmp_name']))
  {
      $image = $_FILES['picture']['tmp_name'];
  
      //~ Check if image is an image
      if (@getimagesize($image))
      {
          $upload_status = TRUE;
          //~ from here you can use yours image as $_FILES['picture']['name'], for example to copy it
          move_uploaded_file($image, realpath(dirname(__FILE__)).'/images/'.$_FILES['picture']['name']);
  
          //~ Also be noticed that the image curently is in OS tmp folder and if you dont copy it, it will be deleted after script execution.
      }
  }
  if ($upload_status)
  {
      echo 'Image successfully uploaded. &lt;br&gt; &lt;img src="images/'.$_FILES['picture']['name'].'"&gt;';
  }
  else
  {
      echo 'nope.jpg';
  }
  
  ?&gt;
  </code></pre>
  
  <p>The output is always; </p>
  
  <p>picture not set </p>
  
  <p>nope.jpg</p>
  
  <p>This means that <code>$_Files['picture']</code> is not set, and there are no errors in the files array. </p>
  
  <p>As you can see from the code above i have already tried the following fixes;</p>
  
  <ul>
  <li>Added the markup for form enctype; <code>enctype="multipart/form-data</code>"</li>
  <li>Added a hidden <code>MAX_FILE_SIZE</code> attribute</li>
  <li>Not show in the code, i have tried adding size='30000000' in the file tag</li>
  <li>I've checked that the value / name are the same when setting and getting file</li>
  <li>I've also checked php.ini to ensure that file_upload is allowed</li>
  </ul>
  
  <p>What could I possibly be missing?</p>
  
  <p>Edit; I've tried this on my desktop and mobile browsers.</p>