Hello, first of all I checked my code on a online syntex checker, so there are no errors with the syntex. The code was based off a website (w3schools) with additions and modifications of my own. I tried changing the path of the upload folder, to a folder within the same directory of the php file, still it didn't work. I changed the file permissions of the folders, still it did not work.

Here is the part of my code that does the upload:
PHP Code:
function filecount($FolderPath) {
$filescount 0;
 
// Open the directory 
    
$dir opendir($FolderPath);
    
// if the directory doesn't exist  return 0
    
if (!$dir){return 0;}
 
// Read the directory and get the files 
    
while (($file readdir($dir)) !== false) {
        if (
is_dir($FolderPath $file) == false) {
            
// Increment the File Count.
            
$filescount++;
        }
    }    
    
// close the directory
    
closedir($dir);
    return 
$filescount;
}



if ((
$_FILES["mp3File"]["type"] == "audio/mpeg") && ($_FILES["mp3File"]["size"] < 10485760))
  {
  if (
$_FILES["mp3File"]["error"] > 0)
    {
    
//header('Location: ../error_page.php?error=83343');
    
echo "Return Code: " $_FILES["mp3File"]["error"] . "<br />";
    }
  else
    {
    echo 
"Upload: " $_FILES["mp3File"]["name"] . "<br />";
    echo 
"Type: " $_FILES["mp3File"]["type"] . "<br />";
    echo 
"Size: " . ($_FILES["mp3File"]["size"] / 1024) . " Kb<br />";
    echo 
"Temp file: " $_FILES["mp3File"]["tmp_name"] . "<br />";    
if (
file_exists("../audio/" $_POST['company'] . "commercials/" $_FILES["mp3File"]["name"]))      {
//header('Location: ../error_page.php?error=83343');
      
echo $_FILES["mp3File"]["name"] . " already exists. ";
      }
    else
      {
$newFileNameCount $filecount("../audio/" $_POST['company'] . "commercials/") + 1;
   
move_uploaded_file($_FILES["mp3File"]["tmp_name"], "../audio/" $_POST['company'] . "commercials/" $_FILES["mp3File"]["name"]); 
The PHP page is echoing this piece of code:
PHP Code:
echo "Upload: " $_FILES["mp3File"]["name"] . "<br />"
    echo 
"Type: " $_FILES["mp3File"]["type"] . "<br />"
    echo 
"Size: " . ($_FILES["mp3File"]["size"] / 1024) . " Kb<br />"
    echo 
"Temp file: " $_FILES["mp3File"]["tmp_name"] . "<br />"
Then it doesn't process the code that follows..

Here is the HTML that calls the code:
html Code:
  1. <form action="p_customvoicemessage.php" method="post" enctype="multipart/form-data">
  2. <font size="2">Browse for your mp3 file and then click Send Message.</font>
  3. <br />
  4. <input type="file" name="mp3File" id="mp3File" />
  5. <br /><br />
  6. <font size="2">Expiry Date (YYYY-MM-DD):</font><br /><input type="text" name="expiryDate" value='<?php echo date("Y-m-d"); ?>' />
  7. <br /><br/>
  8. <input type="hidden" name="company" value="<?php echo $company; ?>" />
  9. <input type="hidden" name="username" value="<?php echo $_SESSION['username']; ?>" />
  10. <input type="submit" value="Send Message" style="width:50%" />
  11. </form>