<!--#include file="conn.asp"-->
<%
session.timeout=30
if request("action")="login" then
name=trim(request.form("name"))
pwd=trim(request.form("pwd"))
id=trim(request.form("id"))
name1=trim(request.form("name1"))
cla=trim(request.form("class"))
tel=trim(request.form("tel"))
if name="" or pwd="" then
response.redirect ("fenshu.asp")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from dbaddress where name='"&name&"'and pwd='"&pwd&"'"
rs.open sql,conn,1,1
if not rs.eof then
'Does the Username exist?
' If not, set strFailed and destroy all objects.
' We'll then display the login form again.
strFailed = "Invalid name"
RS.Close
Set RS = Nothing
Conn.Close
Set objConn = Nothing
response.redirect"error.asp"
else If rs.Fields("Pwd") <> Request.Form("Pwd") Then
strFailed = "Invalid pwd"
Rs.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
response.redirect"error.asp"
Else
Session("name") = "true"
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
Response.Redirect "fenshu.asp"
End If
end if
end if
%>
错误提示:'80020009'
\loginok.asp, line 27
27行是:else If rs.Fields("Pwd") <> Request.Form("Pwd") Then
<%
session.timeout=30
if request("action")="login" then
name=trim(request.form("name"))
pwd=trim(request.form("pwd"))
id=trim(request.form("id"))
name1=trim(request.form("name1"))
cla=trim(request.form("class"))
tel=trim(request.form("tel"))
if name="" or pwd="" then
response.redirect ("fenshu.asp")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from dbaddress where name='"&name&"'and pwd='"&pwd&"'"
rs.open sql,conn,1,1
if not rs.eof then
'Does the Username exist?
' If not, set strFailed and destroy all objects.
' We'll then display the login form again.
strFailed = "Invalid name"
RS.Close
Set RS = Nothing
Conn.Close
Set objConn = Nothing
response.redirect"error.asp"
else If rs.Fields("Pwd") <> Request.Form("Pwd") Then
strFailed = "Invalid pwd"
Rs.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
response.redirect"error.asp"
Else
Session("name") = "true"
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
Response.Redirect "fenshu.asp"
End If
end if
end if
%>
错误提示:'80020009'
\loginok.asp, line 27
27行是:else If rs.Fields("Pwd") <> Request.Form("Pwd") Then
