title: Uploading an image without form submitting
body: <pre><code>&lt;input type='file' name='inputfile' id='inputfile'&gt;
  </code></pre>
  
  <p>I'm trying to upload an image without a form submitting - just after input <code>file</code> is changed:</p>
  
  <pre><code>$('#inputfile').change(function(){
      $.ajax({
          url: "pro-img-disk.php",
          type: "POST",
          data:  new FormData('#inpufile'),
          contentType: false,
          cache: false,
          processData:false,
          success: function(data){
              console.log(data);
          }
      });
  });
  </code></pre>
  
  <p><strong>PHP</strong>  </p>
  
  <pre><code>$src = $_FILES['inputfile']['tmp_name'];
  $targ = "../images/".$_FILES['inputfile']['name'];
  move_uploaded_file($src, $targ);
  </code></pre>
  
  <p>Error:<br>
  <code>Undefined index: inputfile...</code></p>
  
  <p>Any help?</p>