学习php也有四个月了,用基础知识来做一个登录注册
本篇环境:apache+php5.6 ; 原理:目录和MD5加密的密码,COOKIE
用到了两个文件:index.html 和 request.php 其中request.php可以自由设定跳转的目的,代码中已标注
index.html部分:
<html>
<head>
<title>Login and register by vanllaocap</title>
<meta charset="utf-8">
</head>
<body>
<h3>未注册的用户会自动注册</h3>
<form action="request.php" method="post">
<label>用户名</label>
<input type="text" name="username" required />
<label>密码</label>
<input type="password" name="password" required />
<button type="submit">登录</button>
</form>
</ body>
</html>