When i try this code in Mozilla 10.0.1 then code works fine but when i run this code in IE 8.0 code is not working.
what is the problem?anyone can tell me.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<title>Untitled Document</title>
</head>
<body>
<form action=“uploading.php” enctype=“multipart/form-data” method=“post”>
Upload image<input type=“file” name=“file” id=“file”/><br />
<input type=“submit” value=“submit” name=“submit”/>
</form>
<?php
if($_POST[‘submit’]){
if($_FILES[‘file’][‘type’]==“image/jpeg” || $_FILES[‘file’][‘type’]==“image/gif” || $_FILES[‘file’][‘type’]==“image/png”){
if($_FILES[‘file’][‘error’]>0)
{
echo “error”;
}
else
{
echo $_FILES[‘file’][‘name’].“<br/>”;
echo $_FILES[‘file’][‘type’].“<br/>”;
echo ($_FILES[‘file’][‘size’]/1024).“<br/>”;
echo $_FILES[‘file’][‘tmp_name’];
$a = $_FILES[‘file’][‘name’];
if (file_exists($_FILES['file']['name']))
{
echo $_FILES['file']['name']." alredy exists";
}
else
{
move_uploaded_file($_FILES['file']['tmp_name'],$_FILES['file']['name']);
echo $_FILES['file']['name'];
echo "<img src='$a'/>";
}
}
}
else
{
echo “file type wrong”;
}
}
?>
</body>
</html>