一个baogao的数据库,里面user的表,uid是名称 pwd是旧密码 pwd1是新密码 pwd2是确认新密码 。。。。请帮我看看下面那里错了啊,谢谢啊,求大神帮帮
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=session("uid")%> - 修改密码</title>
<style type="text/css">
<!--
.STYLE2 {
font-size: 14px;
color: #990033;
}
-->
</style>
<link rel="stylesheet" type="text/css" href="skin/01/index.css">
<br>
<form id="form1" name="form1" method="post" action="?xg=yes">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" id="bkd">
<tr>
<td height="25" colspan="4" align="center"> </td>
</tr>
<tr>
<td width="15%" height="25" align="right" bgcolor="#FFFFFF">名称</td>
<td width="91%" height="25" colspan="3" bgcolor="#FFFFFF"><span class="STYLE2"><%=session("uid")%><span class="STYLE2"></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">原始密码</td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd" type="password" id="pwd" /></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">新密码</td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd1" type="password" id="pwd1" /></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">密码</td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd2" type="password" id="pwd2" /></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"> </td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input type="submit" name="Submit" value=" 开 始 修 改 " /></td>
</tr>
</table>
</form>
<%if trim(request("uid"))="总经理" then
pwd=trim(request("pwd"))
pwd1=trim(request("pwd1"))
pwd2=trim(request("pwd2"))
if pwd="" or pwd1="" or pwd2="" then
response.write"<script language=javascript>alert(*密码不能为空!*);history.back();</script>"
response.end
end if
if len(pwd1)<3 then
response.write"<script language=javascript>alert(*您的密码太简单了,请重新输入!*);history.back();</script>"
response.end
end if
if pwd1<>pwd2 then
response.write"<script language=javascript>alert(*两次新密码不一样。请重试!*);history.back();</script>"
response.end
end if
set rs=server.CreateObject("adodb.Recordset")
sql="select * from user where uid=*"&session("uid")&"*"
rs.open sql,conn,1,3
if rs("pwd")<>pwd(pwd,6) then
response.write "<script language=javascript>alert(*对不起!原始密码错误!请重试!*);location.href=*xiugai.asp*;</script>"
response.end
else
rs("pwd")=pwd(pdw1,6)
rs.update
response.write "<script language=javascript>alert(*恭喜您!新密码已修改成功!*);history.back();</script>"
rs.close
set rs=nothing
end if
end if%>
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=session("uid")%> - 修改密码</title>
<style type="text/css">
<!--
.STYLE2 {
font-size: 14px;
color: #990033;
}
-->
</style>
<link rel="stylesheet" type="text/css" href="skin/01/index.css">
<br>
<form id="form1" name="form1" method="post" action="?xg=yes">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" id="bkd">
<tr>
<td height="25" colspan="4" align="center"> </td>
</tr>
<tr>
<td width="15%" height="25" align="right" bgcolor="#FFFFFF">名称</td>
<td width="91%" height="25" colspan="3" bgcolor="#FFFFFF"><span class="STYLE2"><%=session("uid")%><span class="STYLE2"></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">原始密码</td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd" type="password" id="pwd" /></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">新密码</td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd1" type="password" id="pwd1" /></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">密码</td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd2" type="password" id="pwd2" /></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"> </td>
<td height="25" colspan="3" bgcolor="#FFFFFF"><input type="submit" name="Submit" value=" 开 始 修 改 " /></td>
</tr>
</table>
</form>
<%if trim(request("uid"))="总经理" then
pwd=trim(request("pwd"))
pwd1=trim(request("pwd1"))
pwd2=trim(request("pwd2"))
if pwd="" or pwd1="" or pwd2="" then
response.write"<script language=javascript>alert(*密码不能为空!*);history.back();</script>"
response.end
end if
if len(pwd1)<3 then
response.write"<script language=javascript>alert(*您的密码太简单了,请重新输入!*);history.back();</script>"
response.end
end if
if pwd1<>pwd2 then
response.write"<script language=javascript>alert(*两次新密码不一样。请重试!*);history.back();</script>"
response.end
end if
set rs=server.CreateObject("adodb.Recordset")
sql="select * from user where uid=*"&session("uid")&"*"
rs.open sql,conn,1,3
if rs("pwd")<>pwd(pwd,6) then
response.write "<script language=javascript>alert(*对不起!原始密码错误!请重试!*);location.href=*xiugai.asp*;</script>"
response.end
else
rs("pwd")=pwd(pdw1,6)
rs.update
response.write "<script language=javascript>alert(*恭喜您!新密码已修改成功!*);history.back();</script>"
rs.close
set rs=nothing
end if
end if%>
这个人叫白衣
