I have this code
<form method="post" id="usrForm" enctype="multipart/form-data">
<input type="file" multiple accept=".jpg,.jpeg,.gif" name="fl[]"/>
</form>
//Some Other tags and elements
<input type="button" id="formSubmit" onclick="$('#usrForm').submit()"/>
In php, when I echo print_r($_FILES["fl"]) I get empty array like this
Array ( [name] => Array ( [0] => ) [type] => Array ( [0] => ) [tmp_name] => Array ( [0] => ) [error] => Array ( [0] => 4 ) [size] => Array ( [0] => 0 ) )
and therefore I cannot upload any images etc. What am I doing wrong? I have been wondering for about 3 hours searching different articles but all in vein.