0

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 Answer 1

1

Files aren't sent in $_POST:

print_r($_FILES);

POST Method Uploads

Sign up to request clarification or add additional context in comments.

1 Comment

Hi, yes, I did that, but there is nothing, is like the input doesn't exist, if I strip the file from everything just the form in a raw html, that son of bagan input file still not send... the post is via ajax, even so, with or without ajax that input is no where to to be found... php 5.4 I'm going nuts...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.