ASP修改密码方面的代码错误!!
大家帮我看看这段代码哪错了,好吗,怎么改正:错误类型:MicrosoftVBScript编译器错误(0x800A03EA)语法错误/mima/editpwd.asp,li...
大家帮我看看这段代码哪错了,好吗,怎么改正:
错误类型:
Microsoft VBScript 编译器错误 (0x800A03EA)
语法错误
/mima/editpwd.asp, line 22
else if xinmima<>queren then
<%dim yonghuming,yuanmima,xinmima,queren,sql
yonghuming=cstr(request.form("yonghuming"))
yuanmima=cstr(request.form("yuanmima"))
xinmima=cstr(request.form("xinmima"))
queren=cstr(request.form("queren"))
sql="select * from use where uesr='"&cstr(request.form("yonghuming"))&"'"
dim conn,rs
set conn=Server.CreateObject("ADODB.Connection")
dbpath=Server.MapPath("mdb\#MoreUser.mdb")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&dbpath
set rs=Server.CreateObject("ADODB.Recordset")
rs.execute(sql)
if rs("pws")<>yuanmima then
response.Write("<script>alert('原密码有误,请重新输入!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>")
Response.End()
end if
else if xinmima<>queren then
response.Write("<script>alert('新密码和确认密码不一致!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>")
Response.End()
end if
else rs("pws")=xinmima
rs.update
rresponse.Write("<script>alert('恭喜,密码修改成功!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>")
Response.End()
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<form name="form1" method="post" action="editpwd.asp">
<table width="190" border="1" align="center">
<tr>
<th width="86" height="30" scope="row"><div align="left" class="style1">用户名:</div></th>
<td width="88"><input name="yonghuming" type="text" size="8"></td>
</tr>
<tr>
<th height="21" scope="row"><div align="left" class="style1">原密码:</div></th>
<td><input name="yuanmima" type="password" size="8"></td>
</tr>
<tr>
<th height="21" scope="row"><div align="left" class="style1">新密码:</div></th>
<td><input name="xinmima" type="password" size="8"></td>
</tr>
<tr>
<th height="20" scope="row"><div align="left" class="style1">确认密码:</div></th>
<td><input name="queren" type="password" size="8"></td>
</tr>
<tr>
<th height="25" colspan="2" scope="row"><input type="submit" name="Submit" value="提交">
<input type="submit" name="Submit2" value="重置"></th>
</tr>
</table>
</form> 展开
错误类型:
Microsoft VBScript 编译器错误 (0x800A03EA)
语法错误
/mima/editpwd.asp, line 22
else if xinmima<>queren then
<%dim yonghuming,yuanmima,xinmima,queren,sql
yonghuming=cstr(request.form("yonghuming"))
yuanmima=cstr(request.form("yuanmima"))
xinmima=cstr(request.form("xinmima"))
queren=cstr(request.form("queren"))
sql="select * from use where uesr='"&cstr(request.form("yonghuming"))&"'"
dim conn,rs
set conn=Server.CreateObject("ADODB.Connection")
dbpath=Server.MapPath("mdb\#MoreUser.mdb")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&dbpath
set rs=Server.CreateObject("ADODB.Recordset")
rs.execute(sql)
if rs("pws")<>yuanmima then
response.Write("<script>alert('原密码有误,请重新输入!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>")
Response.End()
end if
else if xinmima<>queren then
response.Write("<script>alert('新密码和确认密码不一致!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>")
Response.End()
end if
else rs("pws")=xinmima
rs.update
rresponse.Write("<script>alert('恭喜,密码修改成功!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>")
Response.End()
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<form name="form1" method="post" action="editpwd.asp">
<table width="190" border="1" align="center">
<tr>
<th width="86" height="30" scope="row"><div align="left" class="style1">用户名:</div></th>
<td width="88"><input name="yonghuming" type="text" size="8"></td>
</tr>
<tr>
<th height="21" scope="row"><div align="left" class="style1">原密码:</div></th>
<td><input name="yuanmima" type="password" size="8"></td>
</tr>
<tr>
<th height="21" scope="row"><div align="left" class="style1">新密码:</div></th>
<td><input name="xinmima" type="password" size="8"></td>
</tr>
<tr>
<th height="20" scope="row"><div align="left" class="style1">确认密码:</div></th>
<td><input name="queren" type="password" size="8"></td>
</tr>
<tr>
<th height="25" colspan="2" scope="row"><input type="submit" name="Submit" value="提交">
<input type="submit" name="Submit2" value="重置"></th>
</tr>
</table>
</form> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询