<html>
<body>
<h1>欢迎来到道空专区</h1>
<form action="YDH.php" method ="post" >
用户名:<input id="Text1" type="text" name="name"/><br/>
密码:<input id="Text2" type="password" name="password"/><br/>
<input id="Submit1" type="submit" value="确定" />
</form>
</body>
</html>
<?php
$conn=new mysqli("localhost","root","root","denglu");
$zhanghao=$_POST["name"];
$mima=$_POST["password"];
$sql="select name,password from user where name='$zhanghao' and password='$mima'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0)
{
echo"登录成功";
}
else
{
echo "登录失败";
}
mysqli_close($conn);
?>
打赏我,让我更有动力~
© 2016 - 2024 掌控者 All Rights Reserved.
Track-方丈
发表于 2018-7-5
通过。
评论列表
加载数据中...