3.5php下 漫天星宇作业 - Locked

漫天星宇   ·   发表于 2018-7-30   ·   CTF&WP专版

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title></title>

</head>

<body>

<form method="post" action="a.php">

账号:<input type="text" name="user" /><br />

密码:<input type="password" name="pass" /><br />

<input type="submit" value="登录" />

</form>

</body>

</html>



<?php

header("Content-type: text/html; charset=utf-8");

$result=0;

$user=$_POST["user"];

$pass=$_POST["pass"];

$conn=mysqli_connect("127.0.0.1","root","root","test");

if(!$conn){

die('database connect error'.mysql_error());

}

$result=mysqli_query($conn,"select * from user where username='$user' and password='$pass'");

$array=mysqli_fetch_row($result);

if($array){

echo "登陆成功";

}

else echo "登陆失败";

mysqli_close($conn);

?>


打赏我,让我更有动力~

1 Reply   |  Until 2018-7-31 | 624 View

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

通过,金币奖励已发放。

评论列表

  • 加载数据中...

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

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

Powered by 掌控者 Version 2.1.3