某些php post数据在发布不同类型时不可访问

qjp7pelc  于 2021-06-15  发布在  Mysql
关注(0)|答案(1)|浏览(252)
<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>

我有一个表单,发送文件和字符串到我的服务器,我没有问题访问和使用的文件,但我的字符串(命名为“ab”)是无法识别的php!
我用它来验证来自“ab”的数据没有正确发送:

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

因为输入有一个“disabled”属性,它阻止了数据传输到我的php

r55awzrz

r55awzrz1#

如果你看这条线

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

您已禁用该输入。禁用的输入不会发送到php

相关问题