In the receiving file upload form, change source filename to lowercase then check extensions.
$uploadimage = $_FILES['userfile']['name'];
$upload_image = strtolower($upload_image);
$allowed = array('gif','png' ,'jpg');
$ext = pathinfo($upload_image, PATHINFO_EXTENSION);
if(!in_array($ext,$allowed) ) {
// echo 'error';
die("Nope!");
}











