Good to hear your got your problem figured out.
In retrospect, the problem with your previous code:
elseif ($_FILES['file']['size'] > $max_filesize){
echo "Error! flash file must not be bigger than 3 MB <a href='?'>Go back?</a>";
}
$types = array('application/x-shockwave-flash','image/gif','image/jpeg','image/png');
$file = $_FILES['type']['insert_type_here'];
if (!in_array($file,$types))
echo "sorry, the files of type '$file' are not supported";
elseif(file_exists($upload.$filename)){
echo "Error! File already exists on server, rename and try again. <a href='?'>Go back?</a>";
}
was this line:
$file = $_FILES['type']['insert_type_here'];
which should have read:
$file = $_FILES['file']['type'];
then this line would have worked:
if (!in_array($file,$types))
echo "sorry, the files of type '$file' are not supported";
😃