www.gusucode.com > 蓝影会员系统(淡蓝色经典)源码程序 > zhao2.asp
<!--#include file="conn.asp" --> <!--#include file="cu.asp" --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> <style type="text/css"> <!-- body { margin-top: 0px; } .style4 {font-size: 12px} .style3 { font-size: 12px; font-weight: bold; } .unnamed1 { height: 1px; width: 1px; border: none; } --> </style></head> <body background=img/back.jpg> <table width="770" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><!--#include file="tou.asp" --></td> </tr> </table> <table width="80%" height="2" border="0" cellpadding="0" cellspacing="0" id="123213123"> <tr> <td></td> </tr> </table> <table width="770" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td>找回密码第二步:</td> </tr> <tr> <td><form name="form1" method="post" action="zhao2.asp?id=<%=request("id")%>"> <% dim admin,password username=trim(session("admin")) set rs= Server.CreateObject("adodb.recordset") sql = "Select * From admin Where admin='"&username&"'" '============================================admin是数据库里面的字段==username也是数据库里面的字段========= rs.open sql,conn,1,3 if request.form("active")="" then '用来判断的表单提交还是刷新页面,如果是提交表单,那么隐藏域的值肯定被提交,这样Request.form("active")不为空,就执行以下回复语句.如果没提交表单,而是刷新页面,那么隐藏域的值没有提交,Request.form("active")肯定为空,就跳过不执行 else da=replace(trim(request.form("da")),"'","") da2=replace(trim(request.form("da2")),"'","") if da="" then response.write "<SCRIPT language=JavaScript>alert('答案不能为空');" Response.Write"this.location.href='vbscript:history.back()';</SCRIPT>" Response.End else if da2<>da then response.write "<SCRIPT language=JavaScript>alert('答案不正确');" Response.Write"this.location.href='vbscript:history.back()';</SCRIPT>" Response.End end if end if rs.update rs.close set rs=nothing response.redirect "index.asp"'跳转到index.asp页面 end if %> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="20%"><div align="right"><span class="style4"><strong>用</strong></span><span class="style4"><strong>户名:</strong></span></div></td> <td width="80%"><%=rs("admin")%></td> </tr> <tr> <td><div align="right"><span class="style4"><strong>密码问题:</strong></span></div></td> <td><%=rs("wt")%> <input name="da2" type="text" class="unnamed1" id="da2" value="<%=rs("da")%>"></td> </tr> <tr> <td><div align="right"><span class="style3">问题答案:</span></div></td> <td><input name="da" type="text" id="da"></td> </tr> <tr> <td colspan="2"><div align="center"> <input name="active" type="hidden" id="active" value="yes"> <input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit" value="重置"> </div></td> </tr> </table> </form></td> </tr> </table> <br> <br> <table width="770" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><!--#include file="down.asp" --></td> </tr> </table> </body> </html>