I have trouble uploading .png and .bmp extensions while other extensions work fine
$allowed_types = array(".gif" , ".jpg" , ".jpeg", ".png" , ".bmp");
$fname = $_FILES["file"]["name"];
$f_ext = substr($fname, strripos($fname, '.'));
$f_size = $_FILES["file"]["size"];
if (in_array($f_ext,$allowed_types) && ($f_size < 50000))
{
// upload
} else {
//error
I just can't figure out what I'm doing wrong here. Jpg works, gif works, jpeg works, but png and bmp won't.