[求助] 页面密码修改问题请教高手
我现在修改我后台的用户密码, 为什么修改不成功,把源码贴出来, 希望高人指点一下, 我是新人,请多关照! 谢谢!<!--#include file="conn.asp" -->
<%
if request.Form("button") ="提交" then
ppp=conn.execute("select count(*) from [user] where loginID='"&session("loginID")&"' and password='"&request.Form("oldpwd")&"'")(0)
if ppp>0 then
sql="update user set password='"&request.Form("pwd")&"' where loginID='"&session("loginID")&"'"
conn.execute(sql)
%>
<script>
alert("密码修改成功");
location.href("modifypwd.asp");
</script>
<%
response.End()
else
%>
<script>
alert("原始密码错误");
location.href("modifypwd.asp");
</script>
<%
response.End()
end if
end if
%>
<body>
<table width="100%" border="0" cellspacing="1">
<tr class="tb_title">
<th colspan="2">个人密码修改</th>
</tr>
<form method="post">
<tr>
<td width="40%" align="right">原始密码:</td>
<td><input type="password" name="oldPwd" id="oldPwd"></td>
</tr>
<tr>
<td align="right">新 密 码:</td>
<td><input type="password" name="pwd" id="pwd"></td>
</tr>
<tr>
<td align="right">再次确认:</td>
<td><input type="password" name="pwd2" id="pwd2"></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="button" type="submit" class="button" onClick="return check()" id="button" value="提交"></td>
</tr>
</form>
</table>
<script>
function check(){
if((document.all.pwd.value!=document.all.pwd2.value)||(document.all.pwd.value==""))
{
alert('新密码不能为空或二次确认不一致');
return false;
}
}
</script>
</body>