php validation for image

function isValidImageFile($image_type){ $imageType=explode("/",$image_type); switch(trim(strtolower($imageType[1]))){ case 'jpeg':$returnValue=1;break; case 'pjpeg':$returnValue=1; break; case 'gif':$returnValue= 1; break; case 'png':$returnValue= 1; break; /* if you want more extension than just keep on adding like ###…

Continue Reading
Close Menu