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

Popular posts from this blog

c# - HttpResponseMessage System.InvalidOperationException -

sql - Postgresql error: "failed to find conversion function from unknown to text" -