I'm not sure there's a way to tell php that a file is a picture. You just have to list the extensions. The way I'd do it is
$ext = substr($pic_type, -3);
$arr = array("gif","jpg","png","bmp");
for($i=0, $i < sizeof($arr), $i++)
{
if( $ext != $arr[$i] )
{
echo "Only image files are allowed";
}
}
Just add all the image extensions you want into the array.
The above code is not tested, but I'm sure you can make it work.
Richie.