请教各位一下?
我刚用asp做的“用户登录”栏。但怎么调试都不会出来,现附代码于下,请各位帮忙查看一下是那步出了问题。还有在index.asp页中应该怎么写代码。等待!!!
<%@ LANGUAGE = "VBScript" %>
<%
function checklogin(login,password)
set cnndb=server.CreateObject("adodb.connection")
strcon="provider=microsoft.jet.oledb.4.0;data source="& _ server.MapPath("../database/class.mdb")
cnndb.open strcon
set rstlogin=server.CreateObject("adodb.recordset")
strsql="select*from login " & _ "where 用户名='" & login & "'"
rstlogin.open strsql,cnndb
if rstlogin.eof then
checklogin="无此用户名"
elseif rstlogin("密码") <> password then
checklogin="密码错误"
else
checklogin="成功登录"
endif
end function
username=request("username")
userpassword=request("userpassword")
strchecklogin=checkloing(username,userpassword)
if strchecklogin="成功登录" then
session("username") = request("username")
session("userpassword") = request("userpassword")
response.Redirect("page/dengluchenggong.asp)
end if
%>
<html>
<head>
<title>用户登录</title>
</head>
<body>
<center>
<font size= 5 color=blue>用户登录</font>
</center>
<hr>
<center>
<% strchecklogin %><a href="index.asp">请重新登录</a>
</center>
</body>
</html>