if ($_FILES['cover_image']['size'] == 0 && $_FILES['cover_image']['error'] == 0) { // cover_image is empty (and not an error) }