3.5 learner作业提交 - 已锁定

learner   ·   发表于 2018-07-04 15:01:16   ·   CTF&WP专版
login.html <html> <body> <form action="index.php" method="post"> Name: <input type="text" name="name"><br> password: <input type="text" name="password"><br> <input type="submit"> </form> </body> </html> <?php $con = mysql_connect("localhost","root","root"); if (!$con){die('Could not connect: ' . mysql_error());} mysql_select_db("test", $con); if (!get_magic_quotes_gpc()) { $name = addslashes($_POST['name']); } else { $name = $_POST['name']; } $query  = "SELECT * FROM users WHERE name ='{$name}'"; $result = mysql_query($query)or die('<pre>'.mysql_error().'</pre>'); while($row = mysql_fetch_array($result)) {   echo $row['0'] . " " . $row['1'];   echo "<br />"; } echo "<br/>"; echo $query; mysql_close($con); ?>


打赏我,让我更有动力~

1 条回复   |  直到 2018-7-4 | 1564 次浏览

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

通过。

排版有问题。

评论列表

  • 加载数据中...

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

© 2016 - 2024 掌控者 All Rights Reserved.