File uploading problem

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” “”>
<html xmlns=“”>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<title>Untitled Document</title>

<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”/>

if($_FILES[‘file’][‘type’]==“image/jpeg” || $_FILES[‘file’][‘type’]==“image/gif” || $_FILES[‘file’][‘type’]==“image/png”){
echo “error”;
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";
		echo $_FILES['file']['name'];
		echo "&lt;img src='$a'/&gt;";

echo “file type wrong”;



[/COLOR][/B]In I.E. 8 what is the error you get? If you don’t get an error then have you put echo/var_dump/print_r statements in your code to determine how far it gets? Have you checked the values in $_POST, and $_FILLES?


This code is insecure, it would be easy for an attacker to upload and execute a malicious file.

i know this code is insecure but i am in learning stage of php,

if statement is not working correctly, IE displaying else section of if condition only echo “file type wrong”;