asp 对象关闭时,不允许操作.
答案:1 悬赏:40 手机版
解决时间 2021-04-07 01:19
- 提问者网友:原来太熟悉了会陌生
- 2021-04-06 21:57
asp 对象关闭时,不允许操作.
最佳答案
- 五星知识达人网友:污到你湿
- 2021-04-06 22:23
<%
username=Request.Form("username")
passwordold=Request.Form("passwordold")
passwordnew=Request.Form("passwordnew")
if username <> "" and passwordold <> "" and passwordnew <> "" then
set rs1 = Server.CreateObject("ADODB.recordSet")
sql1 = "select * from users where username='"&username&"' and password='"&passwordold&"'"
rs1.open sql1,conn,1,1
if rs1.recordcount = 1 then
set rs = Server.CreateObject("ADODB.recordSet")
sql = "update users set password='"&passwordnew&"' where username='"&username&"'"
rs.open sql,conn,1,1
if rs.recordcount = 1 then
Response.Redirect("pwd.asp")
Response.End()
else
response.write"密码输入错误"
end if
end if
rs.close
set rs=nothing
rs1.close
set rs1=nothing
end if
%>
username=Request.Form("username")
passwordold=Request.Form("passwordold")
passwordnew=Request.Form("passwordnew")
if username <> "" and passwordold <> "" and passwordnew <> "" then
set rs1 = Server.CreateObject("ADODB.recordSet")
sql1 = "select * from users where username='"&username&"' and password='"&passwordold&"'"
rs1.open sql1,conn,1,1
if rs1.recordcount = 1 then
set rs = Server.CreateObject("ADODB.recordSet")
sql = "update users set password='"&passwordnew&"' where username='"&username&"'"
rs.open sql,conn,1,1
if rs.recordcount = 1 then
Response.Redirect("pwd.asp")
Response.End()
else
response.write"密码输入错误"
end if
end if
rs.close
set rs=nothing
rs1.close
set rs1=nothing
end if
%>
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯