我是 php 编程的新手,我无法找到这段代码中的错误:
<p>
<?php
function check_input($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
$data = nl2br($data);
return $data;
}
$password = $_POST['password'];//security check on the input of the password
if (isset($password))
{
if ($password == "hotdog")
{
?>
Here is the secret NASA code: <br/>
<strong>RT4567EGST442YT3ZQS</strong>
<?php
else
{
?>
The password is incorrect. <br/>
<a href="index.php">go and try here again</a>.
<?php
}
}
}
else
{
?>
You have to put a password. thanks to retry on <a href="index.php">this page</a>.
<?php
}
?>
</p>
任何帮助将不胜感激!多谢。麦克风