Answers for "check if $_files is empty php"

PHP
0

php check if post file is empty

if ($_FILES['cover_image']['size'] == 0 && $_FILES['cover_image']['error'] == 0)
{
    // cover_image is empty (and not an error)
}
Posted by: Guest on May-14-2020
0

check if $_files is empty php

if($_FILES['cover_image']['size'] == 0) {
// No file was selected for upload, your (re)action goes here
}
Posted by: Guest on October-25-2021

Browse Popular Code Answers by Language