<!--#include file="open.asp" -->
<%
admin=Request("admin")
pwd=Request("pwd")
if admin<>"" and pwd<>"" then
SQL="select * from admin where admin='"&replace(request.form("admin"),"'","''")&"' and pwd='"&replace(request.Form("pwd"),"'","''")&"'"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open SQL,con,1,1
if rs.Eof thenResponse.Write("<script>alert('對不起,用戶名密碼不正確!')</script>")p")
rs.Close
Set rs=nothing
else
rs.Close
Set rs=nothing
con.Close
Set con=nothing
Session("admin")=true
Response.redirect("admin.asp")
end if
end if
%>
<%
這個網頁代碼在運行的時候提示缺少then,請問需要如何修改,下面是錯誤提示
Microsoft VBScript 編譯器錯誤 錯誤 '800a03f9'
缺少 'Then'
/admin/admin_login.asp,行 9
if rs.Eof thenResponse.Write("<script>alert('對不起,用戶名密碼不正確!')</script>")p")
另外請問要怎么修改才能登陸的時候不判斷賬號密碼直接登陸?
uj5u.com熱心網友回復:
if rs.Eof thenResponse.Write("<script>alert('對不起,用戶名密碼不正確!')</script>")p")這個then后面加個空格
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/20023.html
標籤:網絡編程
上一篇:求vb6 寫的DES加解密源代碼
下一篇:VBA編譯錯誤:找不到工程或庫
