cooldude832 Posted May 16, 2007 Share Posted May 16, 2007 My jpg uploader is flawless in FF and fails out in IE6/7 anyone got some ideas if ($_POST['newimages'] == "yes") { while ($i <= 3) { if ($HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpeg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpg") { $count++; $file_name = ""; $file_name .= "temp."; $file_name .= str_replace(".jpg","",str_replace("/","",str_replace("image","",$HTTP_POST_FILES['imagefile'.$i]['type']))); $ext = ".jpg"; //Lets make a new name $new_file_name=$random_digit.$us.$count.$ext; //Lets Path it $path[$count]= "files/".$new_file_name; if(copy($HTTP_POST_FILES['imagefile'.$i]['tmp_name'], $path[$count])) {} } $i++; } } the form is: <form name='ad' action='ad_preview.php' method='post' enctype='multipart/form-data'> <input type='hidden' name='newimages' value='yes'> <input type="file" name="imagefile0"> <br /> <input type="file" name="imagefile1"> <br /> <input type="file" name="imagefile2"> <br /> <input type="file" name="imagefile3"> <br /> Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/ Share on other sites More sharing options...
cooldude832 Posted May 16, 2007 Author Share Posted May 16, 2007 please help if you can Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254836 Share on other sites More sharing options...
john010117 Posted May 16, 2007 Share Posted May 16, 2007 What's the error message that you're getting in IE6/7? Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254875 Share on other sites More sharing options...
cooldude832 Posted May 16, 2007 Author Share Posted May 16, 2007 I get no error message, only the images are not uploaded. Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254884 Share on other sites More sharing options...
john010117 Posted May 16, 2007 Share Posted May 16, 2007 Try using $_FILE. That's what I always used. Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254886 Share on other sites More sharing options...
cooldude832 Posted May 16, 2007 Author Share Posted May 16, 2007 I had it originally no good. Its no in the php cause FF isn't error but IE is. i'm on 4.4.4 if that helps. Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254888 Share on other sites More sharing options...
kenrbnsn Posted May 16, 2007 Share Posted May 16, 2007 What does the submit button look like in your code? If you put <?php echo '<pre>' . print_r($_POST,true) . '</pre>'; echo '<pre>' . print_r($_FILE,true) . '</pre>'; ?> at the beginning of the processing script, what gets shown on the screen? Ken Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254913 Share on other sites More sharing options...
cooldude832 Posted May 16, 2007 Author Share Posted May 16, 2007 the submit is a simply <input type='submit' value='submit this form'> Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254922 Share on other sites More sharing options...
cooldude832 Posted May 16, 2007 Author Share Posted May 16, 2007 Problem solved: if ($HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpeg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpg") After if ($HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpeg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/pjpeg") Apparently IE uses the MIME types thus i needeed pjpeg Quote Link to comment https://forums.phpfreaks.com/topic/51730-solved-i-can-upload-images-in-ff-but-not-ie6-or-ie7-why/#findComment-254935 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.