title: I can't seem to get the values to upload into the database table
body: <p>I can't seem to get the values to upload into the database table. It keeps giving me this error:</p>
  
  <blockquote>
    <p>Upload Error, please try again.</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>if(isset($_FILES['musicFile']['name']))
  {
      $uploaddir = "/accounts/groups/MDM2013.02/public_html/TPFinal/music/";
      $uploadfile = basename($_FILES['musicFile']['name']);
      $uploadpath = $uploaddir . $uploadfile;
      //echo substr($uploadfile, -3);
      //echo $uploaddir;
      //echo $uploadpath;
      //var_dump($uploadfile);
      if((strcasecmp(substr($uploadfile, -3), "mp3") == 0))//||(strcasecmp(substr($uploadfile, -3, 3), "wav") == 0))
      {
          if(!is_file($uploadpath))
          { 
              if (move_uploaded_file($_FILES['musicFile']['tmp_name'],$uploadpath)) 
              {
                  if((strcasecmp($type,"audio/mp3") == 0))// || (strcasecmp($type, "music/wav")== 0))
                  {
                      echo "File of a valid type ($type), and was stored as $uploadfile&lt;br/&gt;\n";
                      $data = $_POST['musicFile']; $art = $_POST['ArtistName']; $title = $_POST['MusicTitle'];
                      $sql = "INSERT INTO Music(UserName,MusicName,MusicType, Artist, Data) VALUES ('$username','$title','$type', '$art', '$data')";
                      $result= mysql_query($sql);
                      if($result)
                      {
                          if(mysql_affected_rows() == 1)
                          {
                          echo "Music inserted into Database, with ID = ", 
                          mysql_insert_id();
                          }
                      }
                  }else{echo "Failed mime-checking &lt;br/&gt;"; unlink($uploadpath);}
  
              }else{echo "Upload Error, please try again! &lt;BR/&gt; \n";}
  
          }else echo "File already exists &lt;br/&gt;\n";}
  
      else echo "Only MP3 files are acceptable ($uploadfile) &lt;br/&gt;\n";}
  
  include_once ("db_close.php");
  ?&gt;
  </code></pre>