这是前台页面:index.asp
<!--#include file="inc/conn.asp"-->
<% dim rndnum,verifycode
Randomize
Do While Len(rndnum)<4
num1=CStr(Chr((57-48)*rnd+48))
rndnum=rndnum&num1
loop
session("verifycode")=rndnum
%>
<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from admin"
rs.open sql,conn,1,3
%>
<form action="check.asp?action=login" method="POST">
用 户 名:</font>
<td><input name="admin_name" type="text" id="admin_name2">
密 码:</td>
<td><input name="admin_pass" type="password" id="admin_pass2">
验 证 码:</font></td>
<td><input name="verifycode" id="verifycode" size="6" maxlength="4">
<font color="#000000" size="2">请在左边输入<%=session("verifycode")%>
<input type="hidden" name="verifycode2" value="<%=session("verifycode")%>"></font>
<input name="submit" type="submit" class="input" value=" 登 陆 ">
<input type="reset" name="submit2" value=" 重 填 " class="input">
</form>
后台页面:<%@ codepage ="936" %>
<!--#include file="inc/conn.asp"-->
<% dim verifycode,verifycode2
verifycode=trim(Request.Form("verifycode"))
verifycode2=trim(Request.Form("verifycode2"))
if verifycode<>verifycode2 then
response.write"<SCRIPT language=JavaScript>alert('您输入的验证码不正确。');"
response.write"location.href='/index.asp'</SCRIPT>"
founderr=true
else
session("verifycode")=""
%>
<%const name1="felix"
const pass1="982718"%>
<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from admin"
rs.open sql,conn,1,3
if request("action")="login" then
admin_name=request("admin_name")
admin_pass=request("admin_pass")
if admin_name=name1 and admin_pass=pass1 then
session("admin_name")="felix"
session("loc")=1
response.redirect "/manage.asp"
end if%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from admin where admin_name='"&admin_name&"' and admin_pass='"&admin_pass&"'"
rs.open sql,conn,1,3
if not rs.eof then
response.write "<br><br><br><br><font size=2><center> 对不起,您输入的用户名、密码或验证码有误,从重新输入,谢谢!<br><br>本软件建议您使用IE6.0以上版本,分辨率:1024*768<br><br>否则一切后果与本软件无关,特此声明!</font>"
else
session("admin_name")=request("admin_name")
session("loc")=1
response.redirect "/manage.asp"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
end if
%>
我的问题就是:我的数据库里面的管理员名字和密码是正确的,但是后台页面怎么老跳不到manage.asp页面.我估计是我的语句判断有问题,?请帮我看看.3Q了
[求助]带随机数的一个验证登录问题