【发布时间】:2016-08-25 12:46:37
【问题描述】:
我总是收到这个错误:
PHP Notice: Undefined index: selecting-message in /content-protection.php on line 390" and I have tried for many hours to solve this.
我希望有人可以帮助我。
第 390 行代码:
$message = $_POST['selecting-message'];
$update = mysqli_query($connect, "UPDATE `$table` SET enabled='$enabled', alert='$alert', message='$message' WHERE id=14");
echo '<meta http-equiv="refresh" content="0;url=content-protection">';
}
【问题讨论】:
-
发布生成 POST 数据的上一页的代码。该通知告诉您的是,
selecting-message未在 POST 数组中设置。未定义的索引意味着它不存在。