php后端作业(下) - 已锁定

黑客是信仰   ·   发表于 2018-06-25 22:01:21   ·   CTF&WP专版

 <!DOCHTML>

<html>

<meta charset='utf-8'>

<head>

    <title>测试网页</title>

</head>

<body>

 <form name='action' method='post' action='1.php'>

           账号<input type='text'/>

           密码<input type='password'/>

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

</form>

</body>

</html>

-------------------------php--------

<?php

$conn=$mysql_connect('logohost','root','root')or die('数据库连接失败')

$account=$_POST['account']

$user=$_POST['root']

$sql=('select*from admin where account='{$account}'

$re=$mysql_query($sql)

$id=$mysql_fetch_row($re)

if(id!=NULL)

{echo '<p>登录成功</p>'}

else {echo '登录失败'+'<a href='1.html'>返回登录</a>'}

?>

#php还没学多少老师请见谅

打赏我,让我更有动力~

1 条回复   |  直到 2018-6-26 | 1756 次浏览

Track-方丈
发表于 2018-6-26

通过

评论列表

  • 加载数据中...

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

© 2016 - 2024 掌控者 All Rights Reserved.