登录页面出错了.请大家指教.
技术信息(用于支持人员)错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x624 Thread 0xb94 DBC 0x3420064 Jet'。
/on/login.asp, 第 14 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7)
网页:
POST 45 ??? /on/login.asp
POST Data:
name=admin&password=admin&Submit=%B5%C7%C2%BC
时间:
2008年8月24日, 23:43:52
详细信息:
Microsoft 支持
这里是那里出错了.
我在制作登录页面出这种问题了.
请大侠们指教一下.(新手问题)
代码如下:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/web.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("name"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="admin.asp"
MM_redirectLoginFailed="sb.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_web_STRING
MM_rsUser.Source = "SELECT name, pass_word"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM name WHERE name='" & Replace(MM_valUsername,"'","''") &"' AND pass_word='" & Replace(Request.Form("password"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: 36px;
color: #66FF99;
}
.STYLE2 {font-size: 14px}
-->
</style>
</head>
<body>
<div align="center">
<p>网站后台管理</p>
<form ACTION="<%=MM_LoginAction%>" METHOD="POST" id="form1" name="form1">
<label>用户名:
<input name="name" type="text" id="name" />
</label>
<p>
<label>密 码:
<input name="password" type="password" id="password" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="登录" />
</label>
</p>
</form>
<p> </p>
</div>
</body>
</html>