php - how to not upload empty file inputs -
i have many file inputs in html form. of them in array.
for example :
<input type="file" name="attach[]"> <input type="file" name="attach[]"> <input type="file" name="attach[]"> <input type="file" name="attach[]">
how can find empty inputs in php?
use in each when uploading file
<?php if(!empty($_files['attach'][$i])) { //upload function } ?>
Comments
Post a Comment