# Upload script - file type not working in IE but fine in others

**URL:** <https://forum.kirupa.com/t/upload-script-file-type-not-working-in-ie-but-fine-in-others/228357>\
**Category:** Uncategorized\
**Created:** [June 7, 2007, 4:36am UTC](https://forum.kirupa.com/t/upload-script-file-type-not-working-in-ie-but-fine-in-others/228357 "2007-06-07T04:36:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stu\_t](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@stu\_t](https://forum.kirupa.com/u/stu_t)\
**Post date:** [June 7, 2007, 4:36am UTC](https://forum.kirupa.com/t/upload-script-file-type-not-working-in-ie-but-fine-in-others/228357/1 "2007-06-07T04:36:01Z")

</div>

My upload script wont work in IE, it gives the error that only png, jpeg, jpg etc can be uploaded.

this is the script i am using,

```auto
}
if ($HTTP_POST_FILES['img1']['type'] != "image/gif" AND
$HTTP_POST_FILES['img1']['type'] != "image/jpg" AND
$HTTP_POST_FILES['img1']['type'] != "image/jpeg" AND
$HTTP_POST_FILES['img1']['type'] != "image/png" AND !isset($error)) {
	$error = "<b>You may only upload .gif, .jpg and.png files.</b><br><br>";
	unlink($HTTP_POST_FILES['img1']['tmp_name']);

```

It works perfect in safari and firefox!!!

If anyone can help would be great!!

also is there a script where I can make it only accept images with a certain dimension? or it resizes the image??

thanks

stu
