还是老问题: 密码验证修改程序的错误所在!!!???
有错误所在! 代码如下!
网页左下脚会有如下的提示:
行: 1
字符: 22
错误: 缺少 ')'
代码: 0
URL: http://localhost/test/MyAccount_ChangePassword.asp
查看源文件的是:
<script language='javascript'>alert('Wrong,you can't to handle!');location.href='javascript:history.go(-1)';</script>
网页源代码:
<%
sub edit()
call buyok_check_path()
oldpassword=trim(request("oldpassword"))
newpw1=trim(request("newpw1"))
newpw2=trim(request("newpw2"))
if oldpassword="" or newpw1="" or newpw2="" then
response.write "<script language='javascript'>"
response.write "alert('You input is null ,please again.');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if newpw1<>newpw2 then
response.write "<script language='javascript'>"
response.write "alert('Clew:You input that password unlineliness twice, please input it again.');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if llen(newpw1)<3 then
response.write "<script language='javascript'>"
response.write "alert('Wrong,You input newpassword leth less than 3.');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
set rs=conn.execute("select * from buser where UserId='"&request.cookies("buyok")("userid")&"'")
if rs("Userpw1")<>md5(oldpassword) then
'response.write rs("Userpw1")&" "&md5(oldpassword)
response.write "<script language='javascript'>"
response.write "alert('Wrong,You input that oldpassword is wrong.');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if ucase(request.cookies("buyok")("userid"))<>ucase(request.form("userid")) then
response.write "<script language='javascript'>"
response.write "alert('Wrong,you can't to handle!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
sql = "select * from buser where UserId='"&request.cookies("buyok")("userid")&"'"
set rs=Server.Createobject("ADODB.RecordSet")
rs.Open sql,conn,1,3
rs("Userpw1")=md5(newpw1)
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('Succeed,You've changed password。Please fix it!');"
response.write "location.href='MyAccount_ChangePassword.asp';"
response.write "</script>"
response.end
end sub
conn.close
set conn=nothing
%>