gpt4 book ai didi

PHP 表单未发布所有字段

转载 作者:可可西里 更新时间:2023-10-31 23:06:50 26 4
gpt4 key购买 nike

我有一个奇怪的问题,我无法理解。

我有以下表单,当我点击提交时,我没有获取或发布表单中的所有字段。只有两个字段被拾取 - isnew=true action=object &submit=Start

<form name="newOffer" action="/auth/dashboard" method="post">
<td><?php echo form_hidden('isnew', 'true');?><?php echo form_hidden('action', 'object');?><input type="text" id="newOfferItem" placeholder="Offer Free Item" class="input-xlarge"></td>
<td><input type="text" id="newOfferText" placeholder="Offer Description" class="input-xlarge" rel="tooltip" title="Description How to get free item"></td>
<td><input type="text" id="newOfferFreeOn" placeholder="Stamps for free item" class="input-xlarge" rel="tooltip" title="Number only. Ex. 5"></td>
<td><span class="label label-danger">Inactive</span></td>
<td><?php $attributes = 'class = "btn btn-success"'; echo form_submit('submit', 'Start', $attributes);?></td>
</form>

最佳答案

您需要为每个 INPUT 元素添加 NAME 属性 - 代替或补充 ID 属性。

例如

<form name="newOffer" action="/auth/dashboard" method="post">
<td>
<?php echo form_hidden('isnew', 'true');?>
<?php echo form_hidden('action', 'object');?>
<input type="text" NAME="newOfferItem" id="newOfferItem" placeholder="Offer Free Item" class="input-xlarge">
</td>
<td>
<input type="text" NAME="newOfferText" id="newOfferText" placeholder="Offer Description" class="input-xlarge" rel="tooltip" title="Description How to get free item">
</td>
<td>
<input type="text" NAME="newOfferFreeOn" id="newOfferFreeOn" placeholder="Stamps for free item" class="input-xlarge" rel="tooltip" title="Number only. Ex. 5">
</td>
<td>
<span class="label label-danger">Inactive</span>
</td>
<td>
<?php $attributes = 'class = "btn btn-success"'; echo form_submit('submit', 'Start', $attributes);?>
</td>
</form>

关于PHP 表单未发布所有字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16220289/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com