哪位高手能帮我看一下,我的程序哪里出错了???
----CheckUser.asp
<!--#include file="conn.asp"-->
<% if request.Form("username")="" then
response.Write"<script language=javascript>alert('请输入用户名');history.back(-1);</script>"
response.End()
end if
if request.Form("password")="" then
response.Write"<script language=javascript>alert('请输入密码');history.back(-1);</script>"
response.End()
end if
username=trim(request.Form("username"))
password=trim(request.Form("password"))
sql="select * from users where username='"&username&"' and password='"&password&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.Write"<script language=javascript> alert('无此用户');history.back(-1);</script>"
response.End()
else
session("username")=rs("username")
response.Redirect"index.asp"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
-----conn.asp
<!--数据库连接-->
<%
set conn=server.createObject("ADODB.Connection")
dbpath=server.mappath("User.mdb")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath
%>