【php开源代码栏目提醒】:以下是网学会员为您推荐的php开源代码-userreg.php,希望本篇文章对您学习有所帮助。
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<title>用户注册</title>
</head>
<body>
<?php
include('head.php');
require_once('com/db.php');
$db = new DataAccess();
$db->connect();
?>
<div align="center">
<table border="0" width="760" cellspacing="0" cellpadding="0" id="table1" height="421">
<tr>
<td style="border-left: 1px solid #0086DF; border-right: 1px solid #0086DF" width="760" valign="top" bgcolor="#FEFBF4">
<div align="center">
<table border="0" width="705" cellspacing="0" cellpadding="0" id="table2" height="377">
<tr>
<td height="86" width="214">
<img border="0" src="images/regtop.gif"></td>
<td height="86" width="237"></td>
</tr>
<tr>
<td width="705" colspan="4" valign="top">
<script language=javascript>
function test()
{
if (document.form1.id.value==""){
alert("请输入用户名!")
document.form1.id.focus();
return false
}
if (document.form1.pwd.value==""){
alert("请输入密码!");
document.form1.pwd.focus();
return false
}
if (document.form1.pwd.value!=document.form1.pwd1.value){
alert("两次密码输入不一致!");
document.form1.pwd.focus();
return false
}
if (document.form1.question.value==""){
alert("请输入密码问题!")
document.form1.question.focus();
return false
}
if (document.form1.answer.value==""){
alert("请输入密码答案!")
document.form1.answer.focus();
return false
}
return true
}
function reset_form()
{
document.form1.name.value="";
document.form1.pwd.value="";
document.form1.userr.value="";
document.form1.name.focus;
}
</script>
<form name="form1" method="POST" action="com/reg_user_data.php" onsubmit="return test()">
<div align="center">
<table border="0" width="599" cellspacing="0" cellpadding="0" id="table3" height="206">
<tr>
<td width="292" height="30" colspan="3">
<b>√个人用户注册:</b></td>
<td width="307" height="30"></td>
</tr>
<tr>
<td width="100" height="30">登 陆 名:</td>
<td width="222" height="30" colspan="2">
<input type="text" name="id" size="25" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></td>
<td width="307" height="30">
6-20个字符,只能输入(a-z),(A-Z),(0-9)</td>
</tr>
<tr>
<td width="100" height="30">密
码:</td>
<td width="222" height="30" colspan="2">
<input type="password" name="pwd" size="25" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></td>
<td width="307" height="30"></td>
</tr>
<tr>
<td width="100" height="30">密码确认:</td>
<td width="222" height="30" colspan="2">
<input type="password" name="pwd1" size="25" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></td>
<td width="307" height="30"></td>
</tr>
<tr>
<td width="100" height="30">密码问题:</td>
<td width="222" height="30" colspan="2">
<input type="text" name="question" size="25" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></td>
<td width="307" height="30">忘记密码的提示问题</td>
</tr>
<tr>
<td width="100" height="30">密码答案:</td>
<td width="222" height="30" colspan="2">
<input type="text" name="answer" size="25" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></td>
<td width="307" height="30">
忘记密码的提示问题的答案</td>
</tr>
<tr>
<td width="100" height="30"></td>
<td width="222" height="30" colspan="2">
<input type="submit" value="提交" name="B1"></td>
<td width="307" height="30"></td>
</tr>
</table>
</div>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<?php include('end.php');
$db->close();
?>
</body>
</html>
上一篇:
UserModel.php
下一篇:
用遗传算法解决车辆优化调度问题