我如何发布禁用的输入 [英] How do I post disabled input
本文介绍了我如何发布禁用的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我有一些输入,但是其中之一已禁用(是的,我需要我的时间表),但是如何将autocomplete.php发送给insert.php却出现此错误未定义索引:C中的client1: \ wamp \ www \ testlp \ insert.php,第30行
Hello I have some input but one of them is disabled ( yes and i need it for my time sheet )but how do I send it autocomplete.php to insert.php I've this error Undefined index: client1 in C:\wamp\www\testlp\insert.php on line 30
这是我的代码autocomplete.php
Here my code autocomplete.php
<form action = 'insert.php' method="post" >
<input type="text" name="client1" class = "client" size="12" id ="client1" disabled />
</form>
这里是我的代码insert.php
here my code insert.php
session_start();
$date = $_POST['data'] ;
$client1 = $_POST['client1'] ;
echo($client1);
echo($date);
编辑,我尝试过此操作:
<input type="text" name="client1" class = "client" size="12" id ="client1"readonly />
此处错误:Notice: Undefined index: client1 in C:\wamp\www\testlp\insert.php on line 12
推荐答案
使用cypherabe的答案: https://stackoverflow.com /a/22990008/2780941
use the answer from cypherabe: https://stackoverflow.com/a/22990008/2780941
这篇关于我如何发布禁用的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文