错误提示:
技术信息(用于支持人员)
- 错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/pass.asp
- 浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; .NET CLR 1.1.4322)
- 网页:
GET /pass.asp
网页pass.asp的代码如下:
<!--#include file="conn.asp"-->
<!--#include file="md5code.asp" -->
<link href=../css.css rel=stylesheet>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style><body style='cursor:url("Mouse.ani")'>
<center>
修改我的密码(<font color="#0099FF">不修改清留空或者点击“返回”</font>)
<%
dim anum,pass
anum=trim(session("name"))
set rs= Server.CreateObject("adodb.recordset")
sql = "Select * From gl Where anum='"&username&"'"
rs.open sql,conn,1,3
if request.form("active")="" then'用来判断的表单提交还是刷新页面,如果是提交表单,那么隐藏域的值肯定被提交,这样Request.form("active")不为空,就执行以下回复语句.如果没提交表单,而是刷新页面,那么隐藏域的值没有提交,Request.form("active")肯定为空,就跳过不执行
else
'===========================================================下面开始为判断语句==============================================
password=replace(trim(request.form("password")),"'","")
password2=replace(trim(request.form("password2")),"'","")
if password="" or len(password)>16 or len(password)<6 then
response.write "<SCRIPT language=JavaScript>alert('密码长度为6-16个字符');"
Response.Write"this.location.href='vbscript:history.back()';</SCRIPT>"
Response.End
end if
if password2="" then
response.write "<SCRIPT language=JavaScript>alert('确认密码不能为空');"
Response.Write"this.location.href='vbscript:history.back()';</SCRIPT>"
Response.End
else
if password<>password2 then
response.write "<SCRIPT language=JavaScript>alert('密码和确认密码不一致');"
Response.Write"this.location.href='vbscript:history.back()';</SCRIPT>"
Response.End
end if
end if
'===========================================判断语句结束,以下是把表单的数据插入到数据库中======================
rs("password")=md5(Trim(Request.Form("password")))
rs.update
rs.close
set rs=nothing
response.redirect "index.asp"'
end if
'==============================================插入数据库的操作到此结束=====================================
%>
<form action='pass.asp?action=xg' method=post>
<table width="100%" border="1" bordercolor=#3399ff bgcolor=#F2F8FF>
<tr><td width="13%">您的姓名:</td><td width="87%"> <%=session("name")%> </td></tr>
<tr><td>输入新密码:</td><td><input name=password type=password id="password" size="18" maxlength="20" %>
<font color="#00FF00">*</font><font color="#999900">输入新密码</font> </td>
</tr><br>
<tr><td>确认新密码:</td><td><input name=password2 type=password id="password2" size="18" maxlength="20" %>
<font color="#0000FF">*</font><font color="#999966">确认新密码</font> </td>
</tr>
<tr><td colspan=2>备注:<br></td></tr>
<tr align="center" valign="middle"><td colspan=2><input type=hidden name=aid value=<%=rs("id")%> ><input type=submit value="提交" class=ibox><input type=reset class=ibox><input type=button class=ibox value=返回 onclick='javascript:history.back()'></td></tr>
</table>
<div align="left"></div>
</form>
请大虾帮帮忙,谢谢!
[此贴子已经被作者于2006-2-9 10:41:04编辑过]