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

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -