php第二题作业提交 - 已锁定

dk18397606232   ·   发表于 2018-07-04 19:47:42   ·   CTF&WP专版

<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);

?>


打赏我,让我更有动力~

1 条回复   |  直到 2018-7-5 | 1758 次浏览

Track-方丈
发表于 2018-7-5

通过。

评论列表

  • 加载数据中...

编写评论内容
登录后才可发表内容
返回顶部 投诉反馈

© 2016 - 2024 掌控者 All Rights Reserved.