title: move_uploaded_file
body: <p>I have a form with 3 tabs, one for pictures, one for music and one for youtube.
  The first 2 are forms where people can upload files, the second is just for a youtube link.</p>
  
  <p>When people hit the 'upload' button they are sent to a second page where the actual uploading is done. Now uploading musc works, but using the same code for the pictures it doesn't seem to work.</p>
  
  <pre><code>if (isset($_POST['submitfoto'])) {
      // uploaden
      $target_path = "uploads/";
      $target_path = $target_path . time() . $_SERVER['REMOTE_ADDR'] . basename( $_FILES['uploadedfile']['name']); 
      if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
  
      // Here I do a bunch of stuff with the database, but it never gets that far.    
      echo "Thanks for uploading this file.";
  
      } else{ echo "File upload failed";} }
  </code></pre>
  
  <p>Now I get File upload failed all the time. But the exact same code seems to work for uploading .mp3 file.</p>
  
  <p>How is this possible?</p>