You could put the file types you want to allow into an array and check to make sure the file being uploaded is of this type or send an error message:
<?php
$types = array("image/gif","image/jpeg","image/jpg");
//If the Submit button was pressed do:
if(isset( $Submit )){
if (in_array($_FILES['imagefile']['type'],$types)){
// copy files and echo success...
}
// Else echo error message
else {
echo "Wrong Filetype! Couldn't copy.";
}
}