<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> 数据库登陆</title>
</head>
<body>
<form action="1.php" method="post">
账号:<input type="text" name ="name"><br>
密码:<input type="password" name ="password"><br>
<input type="submit" value="登陆">
</form>
</body>
</html>
1.php
<?php
$n=$POST["name"];
$p=$POST["password"];
$con=mysql_connect("localhost",$n,$p);
if(!$con)
{
die('could not connect:'.mysql_error());
}
?>
打赏我,让我更有动力~
© 2016 - 2024 掌控者 All Rights Reserved.
Track-方丈
发表于 2018-7-19
通过,金币奖励已发放。
评论列表
加载数据中...