asp登录程序实现不了功能
我在学习asp 编写的简单登录程序没有报错 但点击登录没有跳转 我数据库 和 下游界面都做了 请高手解答<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="conn.asp"-->
<%
if Ucase(trim(request.ServerVariables("request_method")))="post" then
dim sadminname
dim sadminpassword
'dim message-logined
sadminname = trim(request.Form("txtadminname"))
sadminpassword = trim(request.Form("txtadminpassword"))
sadminname=replace(txtadminname,"","")
sadminpassword=replace(txtadminpassword,"","")
dim sql
dim ors
sql="select * from [admin] where adminname = '"&sadminname &"' and adminpassword='"&sadminpassword &"'"
set ors=server.CreateObject("ADODB.recordset")
ors.open sql,oconn,1,3
if ors.eof and ors.bof then
response.Write("您输入的用户名或密码错误!请<a href=""login.asp"">点击这里</a>重新登录!")
ors.close
set ors=nothing
oconn.close
set oconn=nothing
response.end
else
session("message-logined")=true
ors.close
set ors=nothing
oconn.close
set oconn=nothing
response.Write("<script type=""text/javascript"">alert('您已经成功登录!');location.href='default.asp'")
end if
%>
<!DOCTYPE html public"-//w3c//dtd xhtml 1.0 transitional//en" "http://www.
xhtml1/dtd/xhtm11-transitional.dtd">
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>WeMessage 留言本示例</title>
<link href="style.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
body,td,th {
color: #000;
}
</style>
</head>
<body class="onecolliqctrhdr">
<div id="container">
<div id="header">
<h1>Wemessage 留言本实例</h1>
</div>
<div id="maincontent">
<h2>管理员登录</h2>
<form id="frmlogin" name="frmlogin" method="post" action="">
<p>
<label for="txtAdminName">用户名:</label>
<input type="text" name="txtAdminName" id="txtadminName"
onfocus="this.classname='input-focus'" onblur="this.classname='input-blur'" class="input-blur" />
<label for="txtmessageUser"></label>
<span class="red">*</span></p>
<p>
<label for="txtpassword">密 码:</label>
<input type="password" name="txtadminpassword" id="txtadminpassword"
onfocus="this.classname='input-focus'" onblur="this.classname='input-blur'" class="input-blur" />
<span class="red">*</span></p>
<p>
<label for="btnsubmit"></label>
<input type="submit" name="btnsubmit" id="btnsubmit" value="提交"/>
<input type="reset" name="btnreset" id="btnreset" value="重置"/>
</p>
</form>
</div>
<div id="footer">
<p>copyrights©2007 wemessage</p>
<div id="footer2">
<p><a href="#">管理员登录</a></p>
</div>
</div>
</div>
</body>
</html>