php制作登录注册页面
时间: 2023-08-27 17:04:16 浏览: 53
PHP可以用来制作登录注册页面。下面是一个简单的示例代码:
```php
<!DOCTYPE html>
<html>
<head>
<title>登录注册页面</title>
</head>
<body>
<h2>登录</h2>
<form action="login.php" method="POST">
<label for="username">用户名:</label>
<input type="text" id="username" name="username">
<br>
<label for="password">密码:</label>
<input type="password" id="password" name="password">
<br>
<input type="submit" value="登录">
</form>
<h2>注册</h2>
<form action="register.php" method="POST">
<label for="new_username">用户名:</label>
<input type="text" id="new_username" name="new_username">
<br>
<label for="new_password">密码:</label>
<input type="password" id="new_password" name="new_password">
<br>
<input type="submit" value="注册">
</form>
</body>
</html>
```
上面的代码包含了一个登录表单和一个注册表单,并分别将数据提交到 `login.php` 和 `register.php` 这两个文件中。你可以根据自己的需求,编写相应的登录和注册逻辑来处理表单数据。