In nyour code if
case in line 32 allways true
because actually you check if exist array which defined inside self if
case.
Get file extension e.g.
$ext = pathinfo($_FILES["images"]["name"], PATHINFO_EXTENSION);
and then check if in array e.g.
if(!in_array(strtolower($ext), $allowed)){
die("Not a gif/jpeg/png");
}