ASP用户登陆问题

来源:百度知道 编辑:UC知道 时间:2024/06/04 01:26:46
数据库名huiyuan.mdb,表名pUser213,有username和password。
现在LOGIN.ASP已经把username和password提交到loginnew.asp。
loginnew.asp读取数据库数据,判断用户名和密码正确就连接到index.htm
不正确就连接到CUOWU.ASP,
求loginnew.asp的代码(不要有错误啊,可以用追加分,在线等中)
-------------------------不对啊,都是这样的:

无法显示网页
您要访问的网页有问题,无法显示。

--------------------------------------------------------------------------------

请尝试以下操作:

打开 www.xxxxxxxxx.cn 主页,然后查找指向您感兴趣信息的链接。
单击刷新按钮,或以后再试。

单击搜索,寻找 Internet 上的信息。
也可查看相关站点列表。

HTTP 500 - 内部服务器错误
Internet Explorer

<%
dim conn:set conn=server.CreateObject("Adodb.Connection")
conn..Open "provider=microsoft.jet.oledb.4.0;data source="&server.MapPath("huiyuan.mdb")
dim username:username=trim(request.form("username"))
dim password:password=trim(request.form("password"))
dim rstu,login
login=false
set rstu=server.createobject("adodb.recordset")
rstu.open "select * from [puser213] where username='"&username&"'"
if not(rstu.bof or rstu.eof) then
if password=rstu("password") then
login=true
end if
end if
rstu.close:set rstu=nothing
if login then
response.Redirect("index.htm")
else
response.Redirect("CUOWU.ASP")
end if
%>

不是吧???代码都没问题,打开internet设置>>高级,找到 显示友好的 http 错误信息 ,把前面的勾去掉,这样就会显示详细的错误信息,看看到底是什么错误

代码如下:

<%
db="huiyu