|
楼主 |
发表于 2005 年 11 月 24 日 13:32:04
|
显示全部楼层
求助asp
用asp做的。登陆界面为:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>卫生成绩管理</title>
<style type="text/css">
<!--
.style3 {
font-size: 24px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<form action="check.asp" method="post">
<table width="300" align="center">
<tr><td width="100%" align="center" bgcolor="#68FA61" height="30" colspan="2"><span class="style3">管理员登录</span></td>
</tr>
<tr><td bgcolor="#68FA61" height="20" width="50%">管理员账号</td>
<td width="50%"><input height="20" type="text" name="name"></td></tr>
<tr><td bgcolor="#68FA61" height="20" width="50%">密码</td><td width="50%"><input height="20" type="password" name="passwd" value=""></td></tr>
<tr><td><input type="submit" name="ok" value="登录"></td></tr>
</table>
</form>
</body>
</html>
验证程序为:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html><head></head><body>
<% if requst.form("ok")="登录" then
name=trim(requst.form"name")
passwd=trim(requst.form"passwd")
if ((len(name)<>0) and (len(passwd)<>0)) then
DbPath=server.mappath(guanli.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={Microsoft Access Driver(*.mdb)|;dbp="&DbPath
set dd=server.createobject("adodb.Recordset")
s1="select * from [user] where id='"&name&"' and passwd='"&passwd&"'"
dd.open s1,conn,3,3
if dd.eof then
session("check")=0
response.Write"你无权访问该页"
else
session("check")=1
response.Redirect"su.asp"
end if
else response.Redirect"wsjc.html"
end if
end if %>
</body>
</html>
连接不上!
问题在哪里?哪位给指导一下!谢了!!! |
|