php第二题作业提交 - Locked

dk18397606232   ·   发表于 2018-7-4   ·   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 Reply   |  Until 2018-7-5 | 822 View

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

通过。

评论列表

  • 加载数据中...

编写评论内容
LoginCan Publish Content
返回顶部 投诉反馈

掌控者 © 2016. All Rights Reserved. 掌控者

Powered by 掌控者 Version 2.1.3