还是老问题: 密码验证修改程序的错误所在!!!???

andie2008 2005-12-10 02:09:14
有错误所在! 代码如下!

网页左下脚会有如下的提示:

行: 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
%>
...全文
63 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
andie2008 2005-12-10
  • 打赏
  • 举报
回复
现在问题到了是:

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


中的弹出窗口"Wrong, you can't to hangle!"
我输入了修改密码后,就会出现如此的情况!
请问症结何在????
ybfqlyq 2005-12-10
  • 打赏
  • 举报
回复

<script language='javascript'>alert('Wrong,you can't to handle!');history.go(-1)';</script>

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧