title: moving files from tmp folder to permanent folder
body: <p>im having troubles with moving an uploaded file from temp directory to a permanent filed... please review my code. am i possibly missing something because the code just does not seem to work. it jumps straight to the else part of the if statement</p>
  
  <pre><code>&lt;?php
  $submit =$_POST['submit'];
  if (isset($submit)) 
  {   
      $tittle =$_POST['songTitle'];
      $song = $_FILES['song']['name'];//song name
      $target= 'audios/uploads'.$song;
      move_uploaded_file($_FILES['song']['tmp_name'], $target);// gets file from temp directory and moves it to permanent folder  
  
      if(move_uploaded_file($_FILES['song']['tmp_name'], $target))
      {       
          echo "succcessful";
      }   else{
  
          echo 'failed';
      }
  }
  </code></pre>
  
  <p>?></p>