php check if post file is empty
snippet in php

php check if post file is empty

user5344

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