My php code for upload is supposed to filter out images with file extentions different than the ones below and bigger than 5 Mb.
It's a normal post fileField form in html that runs this php script.
It works like a charm on Firefox and Chrome, but for some reason doesn't work on Internet Explorer. Only dies "Format not allowed or size too big."
Does anyone have any idea why?
Thank you in advance. Jaklins
<?php
$name = $_FILES["fileField"]["name"];
$type = $_FILES["fileField"]["type"];
$size = $_FILES["fileField"]["size"];
$temp = $_FILES["fileField"]["tmp_name"];
$error = $_FILES["fileField"]["error"];
if($error > 0)
die("Nothing to upload.");
else
if ($size < 5000000
&& ($_FILES["fileField"]["type"] == "image/jpg"
|| $_FILES["fileField"]["type"] == "image/jpeg"
|| $_FILES["fileField"]["type"] == "image/jpe"
|| $_FILES["fileField"]["type"] == "image/jfif"
|| $_FILES["fileField"]["type"] == "image/png"
|| $_FILES["fileField"]["type"] == "image/gif"
|| $_FILES["fileField"]["type"] == "image/tga"
|| $_FILES["fileField"]["type"] == "image/rle"
|| $_FILES["fileField"]["type"] == "image/emf"
|| $_FILES["fileField"]["type"] == "image/wmf"))
{
move_uploaded_file($temp, "ITVTE/images/".$name);
echo "<center> Uploaded.";
}
else
{
die("Format not allowed or size too big.");
}
?>