Jump to content

File upload doesnt work on IE


fxuser

Recommended Posts

	if ($btn){
	if((!empty($filename)) && ($error == 0)) {

		if (($filetype == "image/jpeg" || $filetype == "image/jpg" ||
			 $filetype == "image/gif" ||	$filetype == "image/png")
			 && ($filesize < 4508876)) {
				$moving_flag = true;
				$moving_msg = "Your image has been uploaded!";
		} else {
			$upl_error_msg = "Error: Only jpg/gif/png images under 4Mb are accepted for upload";
			$upl_error_flag = true;
		}
	} else {
		$upl_error_msg = "Error: No file uploaded";
		$upl_error_flag = true;
	}
}

 

Why the above code wont work on IE and wont show me "Your image has been uploaded!" message when i have a valid type and size?

 

it works on chrome and FF

Link to comment
Share on other sites

PHP executes on the server and doesn't care what browser your using. it's likely your markup that is the issue, not php.

 

well i use ajax to get the file that has the above code plus the html code for the button and file , the gif works on IE but jpg,png wont show me that the image has been uploaded

 

EDIT : ah i knew it was something that had to do with the file type , so jpgs may also be pjpeg and pngs may also be x-png .. gotta check for all the posibilities.

 

fixed!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.