<? $fileUpload=3 ; for($i=0;i<$fileUpload;$i++) { ?>
<input type="file" name="upload_file" value="" id=" " />
<? } ?>
I want to actually generate three file upload field based on the loop, but this code is not working.
Actual requirement
On the click of the browse button, if the file is selected… the next field of form should appear… automatically and so on.
You needed to change “i” to “$i” in your break condition.
Also don’t get into the habit of short PHP opening tags: Link