i have some code that checks to see if the file ext is a valid picture that we support. The problem is that it is a valid extension, but it returns that it isnt.

here is my code:

PHP Code:
$image $_FILES['image_file']['tmp_name']; 
$memberid $_SESSION['member_id'];
$pos strrpos($image'.'); 
$ext substr($image$posstrlen($image) - $pos);
if(
$ext!="jpg"&&$ext!="jpeg"&&$ext!="png"&&$ext!="tif"&&$ext!="gif") {
           
$error[2] = "The file you selected is not supported by our system.";