title: Using HTML file type in JavaScript
body: <p>Does anyone know how to manage the <code>&lt;input type="file" id="myFile" /&gt;</code> in javascript so I can send the file to a php code?</p>
  
  <p>I have something like this:</p>
  
  <pre><code>&lt;input type="file" id="myFile" /&gt;
  &lt;input type="button" value="FILE" onclick="useFile()" /&gt;
  </code></pre>
  
  <p>Then, in javascript I want to use the file the user uploaded because I want to use it in a PHP code.</p>
  
  <p>How do I get the file and send it to php as a parameter?</p>
  
  <pre><code>function useFile() {
     var myFile = document.getElementById("myFile"); //Does this work?
     // then how do I send it to a php?
  }
  </code></pre>
  
  <p>I hope someone could help me.</p>
  
  <p>Thanks a lot.</p>