亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如下代碼中,asp在關鍵字 'user' 附近有語法錯誤,求指點?

如下代碼中,asp在關鍵字 'user' 附近有語法錯誤,求指點?

Cats萌萌 2022-04-08 11:07:15
<%set conn=server.CreateObject("adodb.connection")str="provider=SQLOLEDB;Server=(LOCAL);Uid=sa;pwd=515891;Database=gcmpt;"conn.open str%><%Dim rsDim dbpuser=request.Form("user")pass=request.Form("pass")set rs=Server.CreateObject("adodb.recordset")dbp=Server.Mappath("LOCAL")str="select *from user where admin='"&user&"'and pass='"&pass&"'"rs.open str,conn,1,1if rs.eof thenresponse.write ("<script language=""javascript"">alert(""沒有該用戶"");location.href(""index.asp"")</script>")response.endelseresponse.write ("<script language=""javascript"">alert(""登錄成功"");location.href(""bangong.asp"")</script>")response.endend if%>高手請幫忙。
查看完整描述

2 回答

?
哆啦的時光機

TA貢獻1779條經驗 獲得超6個贊

str="select *from user where admin='"&user&"' and pass='"&pass&"'"
and前要有空格啊,不然拼裝起來就是 userand pass了,當然不行。

查看完整回答
反對 回復 2022-04-11
?
吃雞游戲

TA貢獻1829條經驗 獲得超7個贊

str="select *from [user] where admin='"&user&"'and pass='"&pass&"'"
以后建表的時候盡量不要用程序默認的字符。

查看完整回答
反對 回復 2022-04-11
  • 2 回答
  • 0 關注
  • 173 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號