<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #include file="conn.asp"-->
<script language=javascript>
function check()
{if (document.form1.yonghuming.value=="")
{alert("请输入用户名");
document.form1.yonghuming.focus();
return false;}
if (document.form1.password1.value=="")
{alert("请输入用户密码");
document.form1.password1.focus();
return false;}
if (document.form1.password2.value=="")
{alert("请再次输入用户密码");
document.form1.password2.focus();
return false;}
if (password1<>password2 then)
{alert("两次输入的密码不一样!")
return false;}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: 24px;
font-weight: bold;
color: #0000FF;
}
-->
</style>
</head>
<body>
<div align="center"><span class="STYLE1">个人注册信息页面</span></div>
<form id="form1" name="form1" method="post" action="">
用户名:
<label>
<input name="yonghuming" type="text" id="yonghuming" size="18" maxlength="18" />
</label>
*(用户名必须在6-9个字符之间)<br><br>
密 码:
<label>
<input name="password1" type="password" id="password" size="18" maxlength="18" />
</label>
*<br>
<br>
确认密码:
<label>
<input name="password2" type="password" id="password" size="18" maxlength="18" />
</label>
*
<p>年 龄:
<label>
<input name="nianling" type="text" id="nianling" size="3" maxlength="3" />
</label>
</p>
<p>性 别:
<label>
<input name="radiobutton" type="radio" value="男" checked="checked" />
</label>
男
<input type="radio" name="radiobutton" value="女" />
女
</p>
<p>地 址:
<input name="adr" type="text" id="adr" size="40" maxlength="40 " />
</p>
<p>Email:
<input name="email" type="text" id="email" size="18" maxlength="18" />
</p>
<p>密码提示问题:
<select name="select" size="1">
<option value="你的姓名?">你的姓名?</option>
<option value="你的学校?">你的学校?</option>
<option value="你爸叫什么?">你爸叫什么?</option>
<option value="你妈叫什么?">你妈叫什么?</option>
</select>
</p>
<p>密码提示答案:
<input name="daan" type="text" id="daan" size="15" maxlength="15" />
</p>
<p> </p>
<input type="submit" name="Submit1" onClick="check()" value="提交" />
<input type="reset" name="Submit2" value="重置" />
</form>
<%
dsql = "select * from user"
set rs=server.createobject("adodb.recordset")
rs.open dsql,conn,1,3
rs=addnew
rs("username")=request.form("yonghuming")
rs("userpass")=request.form("password1")
rs("data")=now
rs("nl")=request.form("nianling")
rs("question")=request.form("select")
rs("answer")=request.form("daan")
rs("adr")=request.form("adr")
rs("sex")=request.form("sex")
rs("email")=request.form("email")
rs.update
set rs=nothing
%>
</body>
</html>