我尝试使用2个php代码向用户询问他的用户名和密码。 然后显示:"您已获得授权"如果他的密码与字符串匹配" coco"并显示"如果不匹配,您将无法获得授权。
select *
from tblUsers
where DIFFERENCE(tblUsers.Name, 'Olof') > 2 --Where 2 is the threshold value
第二个PHP代码:
using
有人有想法吗?
感谢' S 亲切的问候
答案 0 :(得分:0)
在secret.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<?php
if (!(isset($_POST['identifiant'])))
echo "missing identifiant <br />";//changed
if (isset($_POST['password']))
{
if (strcmp($_POST['password'], "coco") == 0)//changed
{
echo "You're authorised";
}
else//changed
{
echo "You're not authorised";
}
}
else//changed
{
echo "missing password";
}
?>
</body>
</html>
答案 1 :(得分:0)
在你的secret.php中尝试替换此
echo "missing identifiant"; <br />
由:
echo "missing identifiant<br />";