php - Image upload not working in IE? -


please help!

i've image uploader seems working great in every browser except ie :(

it seems stuck loading gif , nothing. above code or javascript in actual upload page?

any suggestions?...

<?php session_start(); include 'resizeimage.php'; include '../conf/config.php'; $loggedin = $_session['loggedin_user']; $getmid = mysql_query("select * members username = '$loggedin'"); while($iamid = mysql_fetch_array($getmid)) { $member_id = $iamid['id']; } $path = "../m/members_image/".$member_id."/temp/"; $valid_formats = array("jpg", "jepg", "png", "gif", "pjpeg", "pjpg", "pjpeg", "pjpg", "jpg", "jpeg", "png", "gif"); $pid = date("ymdhis"); $pid = str_replace(".", "", "$pid"); $pid = $member_id; /*$_session['pid'] = $pid;*/ if(isset($_post) , $_server['request_method'] == "post") { $name = $_files['photoimg']['name']; $size = $_files['photoimg']['size']; if(strlen($name)) { $extarr = explode(".", $name); $ext = end($extarr); if(in_array($ext,$valid_formats)) { if($size<(3000000)) { $actual_image_name = $pid.".".$ext; $tmp = $_files['photoimg']['tmp_name']; if(move_uploaded_file($tmp, "$path$actual_image_name")) { $imgsrc = "$path$actual_image_name"; list($width, $height) = getimagesize($imgsrc); $image = new simpleimage(); $image->load($imgsrc); if ( $width > $height ) { $image->resizetowidth(960); } else { $image->resizetoheight(600); } $image->save("$imgsrc"); list ($width1, $height1) = getimagesize($imgsrc); if ( $width1 > 960 ) { $image->resizetowidth(960); $image->save("$imgsrc"); } else {} if ( $height1 > 600 ) { $image->resizetoheight(600); $image->save("$imgsrc"); } else {} echo "<img class='preview'>"; } else { echo "failed"; }; } else { echo "image file size max 3 mb"; } } else { echo "invalid file format.."; } } else { echo "please select image..!"; } exit; } ?> 

javascript:

<script type="text/javascript" >  $(document).ready(function() {   $('#photoimg').live('change', function() {       $("#btn_contaier_browse").hide();     $("#preview").html('');     $("#preview").html("<div class='splittermessages'></div><br><table border='0'><tr><td><img width=60 src='/images/loading.gif'></td><td>uploading image ..</td></tr></table>");      $("#imageform").ajaxform({         target: '#preview',          success: showcrop      }).submit(); }); }); function showcrop() { $("#btn_contaier_browse").show(); $("#tiltusm").html('make thumbnails.. crop image'); $('#currentelement').attr("src", $('#currentelement').attr("src")); $("#currentelement").css("display","block"); $('#currentelement').hide(); $('#currentelement').fadein(500);  } function reloadz() {  settimeout(function(){ window.location = '/photos.html';}, 3000);   } </script> 

i use jquery html form

include jquery files use following code

html

<head> $(function() {     $('#submitbtn').bind('click', function(e) {         $('#myform').submit();         $('#myframe').live('change', function(e) {              //read iframe , put own success message         });     }); }); </head> <body> <form id="myform" action="myaction.php" enctype="multipart/formdata" target="myframe"> <input id="file" type="file" /> <input type="submit" id="submitbtn" /> </form> <iframe id="myframe" name="myframe" ></iframe> </body> 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -