fxuser Posted February 22, 2011 Share Posted February 22, 2011 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 https://forums.phpfreaks.com/topic/228473-file-upload-doesnt-work-on-ie/ Share on other sites More sharing options...
trq Posted February 22, 2011 Share Posted February 22, 2011 PHP executes on the server and doesn't care what browser your using. it's likely your markup that is the issue, not php. Link to comment https://forums.phpfreaks.com/topic/228473-file-upload-doesnt-work-on-ie/#findComment-1178093 Share on other sites More sharing options...
fxuser Posted February 22, 2011 Author Share Posted February 22, 2011 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 https://forums.phpfreaks.com/topic/228473-file-upload-doesnt-work-on-ie/#findComment-1178098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.