-1
<form id="fileform" action="php/upload2.php" method="post" enctype="multipart/form-data">
    <div class="form-group"> 
        <input name="upload[]" type="file" multiple="multiple" class="form-control-file text-white"> 
    </div>
    <div class="form-group">
        <label><b class="text-white">Generated Identifier</b></label>
        <input type="text" id="generatedidentifier" name="ab" class="form-control" disabled="">
    </div>
</form>

I have a form that sends both files and a string to my server, I have no problem accessing and using the files but my string(named "ab") isn't recognized by PHP!

I use this to verify that the data from "ab" isn't being sent properly:

if (isset($_POST["ab"])) {
    $identifier = $_POST["ab"];
    echo $identifier;
    echo " is the ID";
} else {
    $identifier = null;
    echo "no ID supplied";
}

CAUSE Input had a "disabled" attribute, which prevented the data to be transferred to my php

zugo123456789
  • 97
  • 1
  • 1
  • 7

1 Answers1

1

If you look at this line

<input type="text" id="generatedidentifier" name="ab" class="form-control" disabled="">

You have disabled that input. Disabled inputs are not sent to the PHP

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149