最近学习PHP,小试一下验证码的生成,以作记录:
1.注册页面代码如下:
<!DOCTYPE html>
<html>
<head>
<title>用户注册页面</title>
<meta charset="UTF-8"/>
<style type="text/css">
*{
margin:0px;padding:0px;}
ul{
width:400px;
list-style:none;
margin:50px auto;
}
li{
padding:12px;
position:relative;
}
label{
width:80px;
display:inline-block;
float:left;
line-height:30px;
}
input[type='text'],input[type='password']{
height:30px;
}
img{
margin-left:10px;
}
input[type="submit"]{
margin-left:80px;
padding:5px 10px;
}
</style>
</head>
<body>
<form action="zhuce.php" method="post">
<ul>
<li>
<label>用户名:</label>
<input type="text" name="username" placeholder="请输入注册账号"/>
</li>
<li>
<label>密 码:</label>
<input type="password" name="password" placeholder="请输入密码" />
</li>
<li>
<label>确认密码:</label>
<input type="password" name