以下这断代码,是修改用户密码得,但是好像实现不了,请各位看看,问题在哪????
<%
dim username,oldpassword,userpassword,userpassword2
username=trim(session("username"))
oldpassword=trim(request.form("oldpassword"))
userpassword=trim(request.form("userpassword"))
userpassword2=trim(request.form("userpassword2"))
set rs=server.createobject("adodb.recordset")
sql="select * from wbcompanyuser where username='"&username&"' and userpassword='"&userpassword&"'"
set rs=conn.execute(sql)
if oldpassword<>session("userpassword") then
response.write("<script language=javascript>alert('原密码输入有误,请重新输入!');history.go(-1)</script>")
else
rs("userpassword")=userpassword
rs("userpassword2")=userpassword2
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>