<!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还没学多少老师请见谅
打赏我,让我更有动力~
© 2016 - 2024 掌控者 All Rights Reserved.
Track-方丈
发表于 2018-6-26
通过
评论列表
加载数据中...