dtkago3208 2015-02-19 22:24
浏览 24

无法发送输入文件值

This might look like a dumb question but is not
I'm using the following JS's
jquery 1.11.2, jquery-UI 1.11.2, bootstrap 3, input_file, inputmask, iCheck, and jquery Validate.
all current version except for jquery which I'm still using 1.11.2.
All of them are working fine no error at all, the problem I have is with a single input field

<form name="forms1"
          method="post"
          class="form-horizontal"
          id="forms1"
          action="check.php"
          enctype="multipart/form-data"
          accept-charset="utf-8"
          role="form">
[... About 16 input field and selects...]
// At the end just before the submit btn I have this...
<div class="form-group">
                    <label for="images">Would you like to add an image?</label>
                    <input name="images" id="images" type="file" class="file form-control"
                           data-show-upload="false"
                           data-show-caption="true"
                           size="2000">
                    <small class="alert-danger">
We only accept this type of images: .gif, .png, .jpeg, .jpg
                    </small>
                </div>
</form>

So when the user submits the form, everything get verified accordingly except for the input file since is just an option and is not required, if the user do upload a file it will be check separately if everything is correct it will be added to their "application", but here is the thing, that particular input is not sent/post like the rest, empty or not is just not there but if I add random input type text or any other than file it does get send... there is nothing special on this form, is just like any other form.
any ideas as to why that particular input can not be send?

  • 写回答

1条回答 默认 最新

  • dph58509 2015-02-19 22:27
    关注

    Files aren't sent in $_POST:

    print_r($_FILES);
    

    POST Method Uploads

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分