【php开源代码栏目提醒】:以下是网学会员为您推荐的php开源代码-15_4.php,希望本篇文章对您学习有所帮助。
<?php
session_start();
include_once("15_2.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="zh-CN" lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>新会员注册</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body><br />
<?php
if(isset($_GET["action"]) and $_GET["action"]=="apply"){
?>
<script language="JavaScript">
function formcheck() {
if(theForm.username.value == ''){
alert('请填写用户名!');
return false;
}
if(theForm.password.value == '') {
alert('请填写密码!');
return false;
}
if(theForm.repassword.value == '') {
alert('请填写确认密码!');
return false;
}
if(theForm.password.value != theForm.repassword.value) {
alert('两次输入的密码不一致,请检查后重试!')
return false;
}
if(theForm.password.value.length < 6 || theForm.password.value.length > 20) {
alert('密码长度错误!密码长度请限制为6-20位!');
return false;
}
if(theForm.quesion.value == '') {
alert('请填写密码问题!');
return false;
}
if(theForm.answer.value == '') {
alert('请填写问题答案!');
return false;
}
if(theForm.e_mail.value == '') {
alert('请填写Email地址!');
return false;
}
if(theForm.getcode.value == '') {
alert('请填写验证码!');
return false;
}
return true;
}
</script>
<FORM name=theForm action="15_5.php?action=register" method=post onsubmit="return formcheck()">
<table cellpadding=5 cellspacing=0 align=center class=tableborder1 style="border-top:none;">
<TR align=middle><Th colSpan=2 height=21>新用户注册</TH></TR>
<TR align=left>
<TD width="40%" class=tablebody6><input type="hidden" name="" value="">
<B>用户名:</B><BR>注册用户名长度限制为1-12字节</TD>
<TD width="60%" class=tablebody5><INPUT maxLength="12" size=30 name="username"></TD>
</TR>
<TR align=left>
<TD class=tablebody6><b>性别</b>:<br />请选择您的性别</TD>
<TD class=tablebody5><INPUT type=radio CHECKED value=1 name=sex class="radio">
<IMG src="male.gif" align=absMiddle>男孩
<INPUT type=radio value=0 name=sex class="radio">
<IMG src="female.gif" align=absMiddle>女孩</TD>
</TR>
<TR align=left>
<TD width=40% class=tablebody6><b>密码(至少6位)</b>:<br />请输入密码,区分大小写。<br />请不要使用任何类似 '*'、' ' 或 HTML 字符
</TD>
<TD width=60% class=tablebody5>
<INPUT type=password maxLength=20 size=30 name="password">
</TD></TR>
<TR align=left>
<TD width=40% class=tablebody6><b>密码(至少6位)</b>:<br />请再输一遍确认</TD>
<TD class=tablebody5>
<INPUT type=password maxLength=20 size=30 name="repassword">
</TD></TR>
<TR align=left>
<TD class=tablebody6><b>密码问题</b>:<br />忘记密码的提示问题</TD>
<TD class=tablebody5>
<INPUT type=text size=30 name=question>
</TD></TR>
<TR align=left>
<TD class=tablebody6><b>问题答案</b>:<br />忘记密码的提示问题答案,用于取回论坛密码</TD>
<TD class=tablebody5>
<INPUT type=text size=30 name=answer>
</TD></TR>
<TR align=left>
<TD class=tablebody6><B>Email地址</b>:<br />请输入有效的邮件地址</TD>
<TD class=tablebody5>
<INPUT maxLength=50 size=30 name=e_mail></TD>
</TR>
<TR align=left>
<TD class=tablebody6><b>验证码</b>:<br />请按照右边图片提示输入验证码</TD>
<TD class=tablebody5>
<script language="javascript">
function showCode(){
var code = document.getElementById('showcode');
if(code.style.display=="none"){
code.style.display = "";
}
}
</script>
<input name="getcode" type="text" size=8 tabindex="3" onfocus="showCode()"/>
<span id='showcode' style='display:none;'><img src='15_1.php' width=200 height=100 /></span>
</TD>
</TR>
<tr><td width="40%" align=left height=30></td>
<td width="60%" align=left><input type=submit value="注册新用户" name=Submit class=button>
<input type=reset value="清 除" name=Submit2 class=button>
</td></tr>
</table>
</form>
<?php
}else{
info("非法请求","15_3.php");
}
?>
</body>
</html>
上一篇:
15_3.php
下一篇:
英语论文网([网学网]):英语专业本科生毕业论文写作