【发布时间】:2016-10-19 00:32:17
【问题描述】:
我有一个这样的 PHP 表单集
<?php if (isset($submitted)) {
$output = checkData();
if (!is_null($output))
{
echo '<script type="text/javascript">alert("' . $output . '"); </script>';
}
else
{
createMeeting();
echo '<script type="text/javascript">alert("You meeting has been created. All of the recipients should shortly receive an email"); </script>';
header('Location: index.php');
}
} else { ?>
<center>
<form method="POST">
...
<input type="submit" name="submitted" value="Create Meeting">
</form>
<?php
}
?>
当我通过 PHP 代码检查器 (codechecker website) 运行它时,不会返回任何错误。但是,当我单击提交按钮时,似乎永远不会执行 isset($submitted) 代码(我已经通过在代码的该部分添加一些 echo 语句对此进行了测试)。
如果我点击提交按钮,表单就会被清除,所以发生了一些事情。我已经放入了许多不同的操作,但代码仍然没有被命中。
【问题讨论】: