[問題] ASP新手請問帳號登入驗證問題

看板Web_Design作者 (22)時間16年前 (2009/08/31 12:02), 編輯推噓-1(012)
留言3則, 3人參與, 最新討論串1/1
首先感謝此板給我很多資訊 也感謝在這幫助我的各位前輩 以下是我寫的程式 都是東參考西參考寫出來的~不過卻無法驗證~因為他會直接跳進登入成功 請各位大大幫我看出問題所在 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <% username=Request("username") password=Request("password") Set CN=Server.CreateObject("ADODB.Connection") CN.Open "Provider=SQLoledb;" & _ "Data Source=(local);" & _ "Uid=sa ; Pwd=1234;" & _ "Initial Catalog=testdb" Set RS=Server.CreateObject("ADODB.Recordset") SQLstr="Select * From TABLE2 Where username ='" + Request("username") + "' And password ='" + Request("password") + "'" Set RS=CN.Execute (SQLstr) If RS.EOF=ture Then SESSION ("Confirm")="FAIL" %> <SCRIPT LANGUAGE="javascript"> alert("帳號或密碼輸入錯誤,請重新輸入!") location.href="index.html" </script> <% Else SESSION("Confirm")="OK" %> <SCRIPT LANGUAGE="javascript"> alert("登入成功!") location.href="newtext4.asp" </script> <% End If %> </body> </html> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.59.1.60

09/01 01:04, , 1F
Q___Q 幫無可幫,問題太多了…加油!好嗎
09/01 01:04, 1F

09/02 09:33, , 2F
感謝~我自己解決了
09/02 09:33, 2F

06/15 04:48, , 3F
....這三小
06/15 04:48, 3F
文章代碼(AID): #1Acqjm3E (Web_Design)