3.4、后端开发基础PHP - PHP简介及PHP基本函数(下)-----chrisna - 已锁定

chrisna   ·   发表于 2018-10-19 20:29:57   ·   CTF&WP专版

<html>
    <head>
        <meta http-equiv="content-type"  content="text/html; charset=UTF-8"  />
        <title>
            提交表单
        </title>
    </head>
    <body>
        <form  action="post.php" method="post">
            username:<input type="text" name="username" />
            <br/>
            password:<input type="text" name="password"  />
            <br/>
            <input type="submit" value="提交" />
            <br/>
            
        </form>
    </body>
</html>


<?php


$name=$_POST['username'];

$psd=md5($_POST['password']);

$conn=mysqli_connect('localhost','root','root','phpdb');

$result=mysqli_query($conn,"select * from 'phptable' where 'username'=$name and 'password'=$psd;");

$row = mysqli_fetch_row($result);

echo $row[0];

mysqli_close($conn);

?>




打赏我,让我更有动力~

1 条回复   |  直到 2018-10-22 | 1243 次浏览

Track-方丈
发表于 2018-10-22

通过,金币奖励已发放。

评论列表

  • 加载数据中...

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

© 2016 - 2024 掌控者 All Rights Reserved.