<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);
?>
打赏我,让我更有动力~
© 2016 - 2024 掌控者 All Rights Reserved.
Track-方丈
发表于 2018-10-22
通过,金币奖励已发放。
评论列表
加载数据中...