简体   繁体   中英

Can't send Input file values

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?

Files aren't sent in $_POST :

print_r($_FILES);

POST Method Uploads

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM