PHP: Can someone tell me what is wrong with this upload prepossessing code?

N-D

New member
Code:
<?php

if({$_FILES['file'] ["type"]} == "application/x-shockwave-flash"){

if ( move_uploaded_file ($_FILES['file'] ['tmp_name'],
"uploads/{$_FILES['file'] ['name']}") )
{ print '<p> The file has been successfully uploaded </p>';
}
else
{
switch ($_FILES['file'] ['error'])
{ case 1:
print '<p> The file is bigger than this PHP installation allows</p>';
break;
case 2:
print '<p> The file is bigger than this form allows</p>';
break;
case 3:
print '<p> Only part of the file was uploaded</p>';
break;
case 4:
print '<p> No file was uploaded</p>';
break;
}
}
}else{

print '<p> The file it´s not a Flash application.</p>';
break;

}
?>

This is supposed to check the file type of the file first then check for error and then if everything is alright save the file in the server. But I have check for any errors in the code but I don't seem to find one and still when I upload It shows me a blank page.
runescape that wont work man.
 
Back
Top