再次求教,asp中实现密码修改验证,诡异报错

来源:百度知道 编辑:UC知道 时间:2024/06/16 03:33:27
代码有点长,问题出现在 sub two_update() 以后
<%Sub two()%>
<table >
<form method="post" action="u_mod.asp" name=form>
“输原密码
新密码
确认密码”
</table>
<%
End Sub
Sub two_update()
set rs=Server.CreateObject("ADODB.recordset")
rs.open"select username,password from love_main where username='"&username&"'",conn,1,1
IF request.form("ifok")="b" THEN
'检查密码

if request("pass")<>rs("password") then
errmsg=errmsg+"<br>"+"<li>原密码输入错误!"
founderr=true
end if

if request("password1")="" or len(request("password1"))>20 or len(request("password1"))<6 then
errmsg=errmsg+"<br>"+"<li>请输入您的密码(长度不能大于20小于6)

单引号用chr(39)替换
你的这行输出之后格式是乱的,所以才会提示update错误,就是引号的问题
response.end不加也能正常运行

拜托,要拼成正确的格式才行耶

完全替换应该是换成

"&chr(39)&"