在appServ文件夹的www文件夹中创建一个test文件夹,里面存放三个php文件,分别为index.php(用户注册界面),reg.php(验证是否注册成功),auth.php(用于产生验证码)
index.php
<!DOCTYPE html>
<html>
<head>
<!--meta charset="UTF-8"-->
<title>注册界面</title>
<style>
border-collapse:collapse;
</style>
</head>
<body>
<h2>用户注册界面</h2>
<hr>
<table width="500px" border="1px">
<form action="reg.php" method="post">
<tr>
<td>姓 名:</td>
<td><input type="text" name="username" id=""></td>
</tr>
<tr>
<td>密 码:</td>
<td><input type="password" name="password" id=""></td>
</tr>
<tr>
<td>验证码:</td>
<td><input type="text" id="