表单数据,我用这个代码:复位上卸载
if(isset($_POST['btitle'])) {
if(count($errors) > 0) {
foreach($errors as $error)
$errContent .= "<li>".$error;
echo notification(
$errContent,
FALSE,
"The following errors were encountered:"
) . "<div style='margin-bottom: 10px;'></div>";
}
else {
echo notification(
"<li>New form added!",
TRUE,
"Success:"
) . "<div style='margin-bottom: 10px;'></div>";
}
}
当我输入一个名为“BTITLE”输入的东西,点击提交按钮,一切都很好,直到我刷新页面 - 它应该丢失数据并在刷新后重新开始,但它会一直说“成功”,即使“btitle”输入为为空。
我在做什么错?