开发者

Dynamically generating input field [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
开发者_开发百科

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 8 years ago.

Improve this question
<? $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.


<?php $fileUpload=3 ; for($i=0;$i<$fileUpload;$i++) { ?>
    <input type="file" name="upload_file" value="" id=" " />
<?php } ?>

You needed to change "i" to "$i" in your break condition.

Also don't get into the habit of short PHP opening tags: Link

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜