Te dejaste lo del else
<?php
$filesize = $_FILES['userfile']['size'];
$filetype = $_FILES['userfile']['type'];
$types=array("jpeg","gif","png");
if ( $filesize > 0 && $filesize <= 100000 && in_array($type, $types) ) { // realizar acciones
}else{
echo "Imagen no valida!.";
?>