你好,我有一些输入内容,但其中一个被禁用了(是的,我需要它来填写我的时间表),但我该如何将其发送到autocomplete.php再到insert.php?我收到了以下错误提示:在 C:\wamp\www\testlp\insert.php 的第30行出现 Undefined index: client1 错误。
这是我的 autocomplete.php 代码:
<form action = 'insert.php' method="post" >
<input type="text" name="client1" class = "client" size="12" id ="client1" disabled />
</form>
这是我的代码 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 />
这里出现了错误:提示:在 C:\wamp\www\testlp\insert.php 的第 12 行,client1 未定义
readonly
替代disabled
。 - Lix<input type="text" name="client1"
@Thephpdoge旁边添加以下编程内容:<input type="text" name="client1" class = "client" size="12" id ="client1" value="<?php echo $_POST['client1']; ?>" readonly />
-或者-<input type="text" name="client1" class = "client" size="12" id ="client1" value="<?php echo $client1; ?>" readonly />
- Funk Forty Niner