[英]Why am I getting an "undefined index" error?
I am getting an undefined index error from the following code:我从以下代码中收到未定义的索引错误:
<?php
echo"<input name='type' disabled='disabled' type='text' id='type' value=$Room_type />";
?>
if(isset($_POST['type']))
{
$type=$_POST['type']
}
假设您的代码是正确的,而不仅仅是您提供的代码,浏览器不会提交禁用的表单输入,这就是$_POST['type']
是undefined
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.