This is the code I have first of all
$allowedExts = array("gif", "jpeg", "jpg", "PNG", "png");
$extension = end(explode(".", $_FILES["file"]["name"]));
if ((($_FILES["file"]["type"] == "image/gif") // .gif
|| ($_FILES["file"]["type"] == "image/jpeg") // .jpeg
|| ($_FILES["file"]["type"] == "image/jpg") // .jpg
|| ($_FILES["file"]["type"] == "image/jpg") // .jpg
|| ($_FILES["file"]["type"] == "image/PNG") // .PNG
|| ($_FILES["file"]["type"] == "image/png")) //.png
&& ($_FILES["file"]["size"] < 2000000)
&& in_array($extension, $allowedExts)
What I want is so I am able to Upload .RAR/.ZIP files as well.