高手指点下哪里出错了
输入不存在的账号提交时 不提示账号不存在 而是无法显示
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="adoconn.asp"-->
<!--#include file="md5.asp"-->
<%
username=trim(Request.Form("username"))
jpassword=md5(trim(Request.Form("jpassword")))
password1=trim(Request.Form("password1"))
password2=trim(Request.Form("password2"))
password=md5(password2)
if password1=password2 then
sql="select DISTINCT F_Password from T_usercore where F_username='"&username&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write "账号不存在!"
rs.close
set conn=nothing
else
if UCase(rs("F_Password"))=jpassword then
conn.execute("update T_usercore set F_Password='"&password&"' where F_username='"&username&"'")
response.write "密码修改成功!<br>"
response.write "你的账号为:"&username&"<br>"
response.write "新 密 码为:"&password1&"</font><br>"
response.write "请妥善保管好自己的账号密码,如有丢失,GM不负任何责任!"
else
response.write "密码错误!"
end if
end if
rs.close
set conn=nothing
else
response.write "两次次输入的新密码不一致!"
end if
%>
[ 本帖最后由 dzxiaojie 于 2010-3-5 00:59 编辑 ]