SkyRanger Posted April 26, 2007 Share Posted April 26, 2007 I am currently working on a image upload script with some help from a couple of the members here that I greatly appreciate in fixing some of my problems. Well I found another BIG problem. I can upload no problem with FF but when tested on IE it will not upload. I am not sure what the problem is. Here is the current code: <form name="form1" method="post" action="" enctype="multipart/form-data"> <input name="desc" type="text" value="DO NOT USE YET" size="30" /> <input type="file" name="imagefile"> <br> <input type="submit" name="submit" value="Submit"> <? if(isset( $submit )) { //If the Submitbutton was pressed do: if (is_image($_FILES['imagefile']['type']) == TRUE){ copy ($_FILES['imagefile']['tmp_name'], "files/images/".$_FILES['imagefile']['name']) or die ("Could not copy"); echo "<br>"; $uploaddate = date("l F j, Y"); $filename = $_FILES['imagefile']['name']; $owner = $logged; include "inc/dbinfo.inc.php"; // database connect script. $connection=mysql_connect ("$dblocation", "$dbusername", "$dbpassword") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("$dbname"); $sql = "INSERT INTO memberimages VALUES ('', '".$filename."', '".$owner."', '".$desc."', '".$uploaddate."')"; $result = mysql_query($sql) or die ('I could not add information to the database because ' . mysql_error()); echo "Name: ".$_FILES['imagefile']['name']."<br>"; echo "Size: ".$_FILES['imagefile']['size']."<br>"; echo "Type: ".$_FILES['imagefile']['type']."<br>"; echo "Image Upload Completed"; } else { echo "<br><br>"; echo "Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")<br>"; } } ?></form> The above code works perfectly in Firefox but will not in IE. The only thing that echos after submit is: image/jpg and that is it. Link to comment https://forums.phpfreaks.com/topic/48858-solved-image-upload-problem-with-ie/ Share on other sites More sharing options...
kalivos Posted April 26, 2007 Share Posted April 26, 2007 What version of IE? Have you tested 6 & 7? Link to comment https://forums.phpfreaks.com/topic/48858-solved-image-upload-problem-with-ie/#findComment-239458 Share on other sites More sharing options...
SkyRanger Posted April 26, 2007 Author Share Posted April 26, 2007 Have tested on IE7 Link to comment https://forums.phpfreaks.com/topic/48858-solved-image-upload-problem-with-ie/#findComment-239462 Share on other sites More sharing options...
kalivos Posted April 27, 2007 Share Posted April 27, 2007 Test it out on IE 6 and see if you have the same problem. It might be a bug with IE 7 Link to comment https://forums.phpfreaks.com/topic/48858-solved-image-upload-problem-with-ie/#findComment-239464 Share on other sites More sharing options...
SkyRanger Posted April 27, 2007 Author Share Posted April 27, 2007 No, still the same problem. Link to comment https://forums.phpfreaks.com/topic/48858-solved-image-upload-problem-with-ie/#findComment-239466 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.