帮我看看错在那里!急(贴子长.分两贴..)
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<!--#include file="md5.asp"-->
<%
dim action
action=request("action")
if action="step2" then
dim username
username=checkstr(trim(request.form("username")))
if username="" then
call mb("请输入登陆帐号!","",0)
end if
set rs=server.createobject("adodb.recordset")
sql="select question from author where username='"&username&"'"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
call mb("对不起,找不到此登陆帐号!","",0)
else
%>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="border">
<tr>
<td width="190" valign="top" bgcolor="#F7F7F7">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22"><img src="images/left_getpwd.gif" alt="获取密码" width="190" height="34" border="0"></td>
</tr>
<tr>
<td height="22" align="center"> </td>
</tr>
<tr>
<td height="22" align="center"> √<font color="#000000"> 填写登陆帐号</font></td>
</tr>
<tr>
<td height="22" align="center">↓</td>
</tr>
<tr>
<td height="22" align="center">→<font color="#FF0000"> 填写密码答案</font></td>
</tr>
<tr>
<td height="22" align="center">↓</td>
</tr>
<tr>
<td height="22" align="center">获取您的密码</td>
</tr>
<tr>
<td height="22"> </td>
</tr>
<tr>
<td height="22"> </td>
</tr>
</table>
</td>
<td width="1" valign="top" background="images/bg_vline.gif"></td>
<td valign="top"> <TABLE align=center
background="images/line01.gif"
border=0 cellPadding=0 cellSpacing=0 height=24 width="100%">
<TR>
<TD height=21 width="63%"> <IMG height=12 src="images/A3.gif" width=12>
当前位置:<A href="index.asp">网络展示中心</A> -> 获取登陆密码 ->
填写密码答案 </TD>
<TD height=21 width="37%"> </TD>
</TR>
</TABLE>
<form action="?action=step3" method="post" name="getpassword" id="getpassword">
<TABLE align=center border=0 borderColor=#000000 cellPadding=0
cellSpacing=0 width="99%">
<TR>
<TD
background="images/T_back.gif"
width="18%"><IMG src="images/T_1.gif" width=90 height=24 border="0"></TD>
<TD
background="images/T_back.gif"
width="77%"> <font color="#993300">获 取 登 陆 密 码</font></TD>
<TD width="5%"><IMG height=24 src="images/T_2.gif" width=29></TD>
</TR>
</TABLE>
<table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="23%" height="25" align="center">密码问题: </td>
<td width="77%" height="25"><b><%=rs(0)%></b></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="center">密码答案: </td>
<td height="25">
<input name="answer" type="text" class="input" id="answer" size="25"></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="30" colspan="2">
<input name="username" type="hidden" id="username" value="<%=username%>">
<input name="Submit4" type="button" class="button" value=" 上一步" onclick="javascript:history.go(-1);">
<input name="Submit3" type="submit" class="button" value=" 下一步 ">
</td>
</tr>
</table>
</form>
<p> </p></td>
</tr>
</table>
<%
end if
rs.close
set rs=nothing
elseif action="step3" then
dim answer
username=checkstr(request.form("username"))
answer=checkstr(trim(request.form("answer")))
if username="" then
call mb("对不起,请指定要取回密码的登陆帐号!","getpassword.asp",1)
end if
if answer="" then
call mb("请输入密码答案!","",0)
end if
set rs=conn.execute("select answer,userpassword from author where username='"&username&"'")
if rs.bof and rs.eof then
call mb("对不起,找不到此帐号信息!","getpassword.asp","")
elseif rs(0)<>answer then
call mb("对不起,密码答案不正确!","",0)
else
%>