Home > Software engineering >  For help
For help

Time:11-13

<%
The admin=Request (" admin ")
The PWD=Request (" PWD ")
If admin<>" "And pwd<>" "Then
SQL="select * from admin where admin='" & amp; The replace (request form (" admin "), "'", "" '") & amp;" 'and the PWD=' "& amp; Replace (request Form (" PWD "), "'", "" '") & amp;" '
"Set the rs=Server. CreateObject (" ADODB. You ")
Rs. The Open SQL, con, 1, 1
If the rs. Eof thenResponse. Write (" & lt; script> Alert (" sorry, the user name password is incorrect! ') & lt;/script>" ) p ")
Rs. Close
Set the rs=nothing
The else
Rs. Close
Set the rs=nothing
Con. Close
The Set of con=nothing
The Session (" admin ")=true
Response. Redirect (" admin. Asp ")
End the if
End the if
%>
<%



This web page code at run time suggest lack of then, do you need to modify, below is the error message
Microsoft VBScript compiler errors mistakes' 800 a03f9 '

The lack of 'Then'

/admin/admin_login. Asp, line 9

If the rs. Eof thenResponse. Write (" & lt; script> Alert (" sorry, the user name password is incorrect! ') & lt;/script>" ) p ")

And could you tell me how to modify the landing can not judge to account password landing directly?

CodePudding user response:

If the rs. Eof thenResponse . Write (" & lt; script> Alert (" sorry, the user name password is incorrect! ') & lt;/script>" ) p ")

Behind this then add a space
  • Related