Php <;输入>;元素不发布数据?

Php <;输入>;元素不发布数据?,php,html,forms,input,Php,Html,Forms,Input,我有一个表单页面,当我提交此表单时,除此之外,所有输入均已成功发布: <input id="TC" class="form-control" name="kullanici_id" type="text" onchange="edit()" <?php if($this->data['kullanici_id']){echo 'readonly';} ?> value="<?php echo $this->data['kullanici_id']

我有一个表单页面,当我提交此表单时,除此之外,所有输入均已成功发布:

<input id="TC" class="form-control" name="kullanici_id" type="text" onchange="edit()" 
  <?php if($this->data['kullanici_id']){echo 'readonly';} ?>  
  value="<?php echo $this->data['kullanici_id']?>">

值=”“>
但是为什么呢

-这是我的.phtml文件:

<html>
<head>

</head>
<body>
<form  enctype="multipart/form-data" action="/admin/kaydet" method="post" onSubmit="javascript: beforeSubmit();">
    <?php if(strlen($this->data['id'])):?>
        <input type="hidden" name="id" value="<?php echo $this->data['id']?>">
    <?php endif;?>
    <font color="green"><h3>DÜZENLE</h3></font>
    <img src="/foto/<?php echo $this->data['fotograf']?>" height="110" width="110" align="left" />
    <table class="table">
        <tr>
            <td>T.C. Kimlik No.:</td>
            <td><input id="TC" class="form-control" name="kullanici_id" type="text" onchange="edit()" <?php if($this->data['kullanici_id']){echo 'readonly';} ?>  value="<?php echo $this->data['kullanici_id']?>"></td>
        </tr>
        <?php if(!strlen($this->data['id'])):?>
        <tr>
            <td>Parola:</td>
            <td><input id="password2" class="form-control" type="password" name="parola" value="<?php echo $this->data['parola']?>"></td>
        </tr>
            <tr>
                <td>Parola Tekrar:</td>
                <td><input onchange="passwordCheck(this.value)" class="form-control" type="password" name="parola" value="<?php echo $this->data['parola']?>"></td>
        </tr>
        <?php endif; ?>
    </table>
    <td><button type="submit" class="btn btn-success btn-sm glyphicon glyphicon-floppy-disk">KAYDET</button> </td>
</form>
</body>
</html>

“height=“110”width=“110”align=“left”/
T.C.Kimlik编号:
值=”“>
帕罗拉:

您的字段未提交的原因是它设置为
只读

原因是“如果用户无法更改字段,则无需提交,因为值将始终保持不变”

缓解此行为的一种方法是添加具有相同名称的隐藏字段

<input type="hidden" name="kullanici_id" value="<?php echo $this->data['kullanici_id']?>"> />
<input id="TC" class="form-control" name="kullanici_id" type="text" onchange="edit()" <?php if($this->data['kullanici_id']){echo 'readonly';} ?>   value="<?php echo $this->data['kullanici_id']?>" />

似乎该字段被设置为
readonly
,因此任何更改都将被丢弃并发布到服务器。您可能希望向我们展示实际发布的内容。请发布完整的源代码。@IsaacKleinman,因为给定代码中存在
readonly
而非
禁用的
。因此它肯定会被处理,对吗r输入包含值还是为空?我的意思是,当你在表单中查看时,如果你看到一些值:-),并且你正在尝试对整个帖子进行var_dump()处理?输入是否在你的
中?