| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 458 人关注过本帖
标题:注册出错了......
只看楼主 加入收藏
kennychaly
Rank: 1
等 级:新手上路
帖 子:39
专家分:0
注 册:2007-6-19
收藏
 问题点数:0 回复次数:1 
注册出错了......

<%@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>
密 &nbsp;码:
<label>
<input name="password1" type="password" size="18" maxlength="18" />
</label>
*<br>
<br>
确认密码:
<label>
<input name="password2" type="password" size="18" maxlength="18" />
</label>
*
<p>年 &nbsp;龄:
<label>
<input name="nianling" type="text" id="nianling" size="3" maxlength="3" />
</label>
</p>
<p>性&nbsp; 别:
<label>
<input name="radiobutton" type="radio" value="男" checked="checked" />
</label>

&nbsp;&nbsp;&nbsp;
<input type="radio" name="radiobutton" value="女" />


</p>
<p>地&nbsp;址:

<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>&nbsp;</p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<input type="submit" name="Submit1" value="提交" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" name="Submit2" value="重置" />
</form>
<%
dsql = "select * from user where id is not null"
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
rs.close
%>

</body>


</html>

图片附件: 游客没有浏览图片的权限,请 登录注册

搜索更多相关主题的帖子: 注册 
2007-07-02 11:37
kennychaly
Rank: 1
等 级:新手上路
帖 子:39
专家分:0
注 册:2007-6-19
收藏
得分:0 

<%@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>
密 &nbsp;码:
<label>
<input name="password1" type="password" size="18" maxlength="18" />
</label>
*<br>
<br>
确认密码:
<label>
<input name="password2" type="password" size="18" maxlength="18" />
</label>
*
<p>年 &nbsp;龄:
<label>
<input name="nianling" type="text" id="nianling" size="3" maxlength="3" />
</label>
</p>
<p>性&nbsp; 别:
<label>
<input name="radiobutton" type="radio" value="男" checked="checked" />
</label>

&nbsp;&nbsp;&nbsp;
<input type="radio" name="radiobutton" value="女" />


</p>
<p>地&nbsp;址:

<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>&nbsp;</p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<input type="submit" name="Submit1" value="提交" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" name="Submit2" value="重置" />
</form>
<%
dsql = "select * from user where id is not null"
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
rs.close
%>

</body>


</html>



我就是什么都不会
2007-07-02 11:38
快速回复:注册出错了......
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.040272 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved