checking mutiple file input in php
<p>Guys have a problem don't know why this is not working, i have file input field which can upload multiple images.</p>

<p>this is my form</p>

<pre><code>&lt;form method="post" action="" enctype="multipart/form-data"&gt;
&lt;input name="images[]" type="file" multiple="multiple"&gt;
&lt;input type="submit" name="test" value="test"/&gt;
&lt;/form&gt; 
</code></pre>

<p>If i submitted the code without selecting any files, i need to display an error message.
Here is my php code</p>

<pre><code>if(!empty($_FILES['images']['name'])){
foreach($_FILES['images']['name'] as $key =&gt;$value){
//other code
}
}else{
echo 'No images have been selected';
}
</code></pre>

<p>but this won't work any idea why is that..?</p>
