Hello everybody i am upload image using php file uploader code provided at w3schools and it is uploading the images but when i upload swf file it will give me errors... i dont know why this is happening any suggestions...

Much Obliged

Are you sure that you are with in these limits.
or try to print the error.

yes Shanti C i am with in these limits; here is my server side code

move_uploaded_file($_FILES["myfile"]["tmp_name"],
      "upload/" . $_FILES["myfile"]["name"]);

	echo $_FILES['myfile']['name'];

when i upload an image of jpg/png it will upload it but in case of swf file it doesn't
Much Obliged

The script w3schools offers is limited to image file types only. Add the flash file type and it should work.

if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg")
|| ($_FILES["file"]["type"] == "application/x-shockwave-flash"))
&& ($_FILES["file"]["size"] < 20000))

Regards
Arkinder

commented: yes +6
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.