上楼说的对应该是代码问题
<!--#include file="conn.asp"-->
<%
IF session("username")="" Then
Response.Write "<div align='center'><B>对不起你的操作权限不够!或你停留的时间过长,请<a href='index.asp' target='_parent'>重新登陆</a>!</B>"
Response.Write "</div>"
Response.End
End IF
%>
<%set rs1=server.createobject("adodb.recordset")%>
<%
if request("action")="change" then
pass=request("password")
if pass="" then
Response.Write "<SCRIPT LANGUAGE='JavaScript'>"
Response.Write "alert('密码不能为空!');"
Response.Write "history.go(-1);"
Response.Write "</SCRIPT>"
Response.End
end if
sql="select top 1 * from admin"
rs1.open sql,conn,1,3
rs1("username")=request("username")
rs1("password")=request("password")
rs1.update
rs1.close
response.write"<SCRIPT language=JavaScript>alert('管理员信息修改成功!');"
response.write"location.href='?'</SCRIPT>"
else
%>
<style type="text/css">
<!--
.style1 {
color: #CCFFFF;
font-weight: bold;
font-family: "华文彩云";
font-size: 24px;
}
-->
</style>
<body Style="background-color:#ccffff" text="#000000" leftmargin="5" topmargin="5">
<form name="FORM1" method="POST" action="?action=change" >
<div align="center">
<%sql="select top 1 * from admin"
rs1.open sql,conn,3,3
%>
<table width="427" border="1" align="center" cellpadding="4" cellspacing="1" bordercolor="#9EB6D8" >
<tr bgcolor="#F7F7F7">
<td colspan="2" class="a1" bgcolor="#9EB6D8"><div align="center"><strong>管理员信息设置</strong></div></td>
</tr>
<tr align="center" valign="top" bgcolor="#F7F7F7">
<td colspan="2" bgcolor="#9EB6D8" ><strong><font color="#FF0000">此类非常重要,如要修改谨慎,如忘记密码请在</font></strong><a href="http://user.qzone. target="_blank" class="style1">本人网站中寻找答案</a>
</td>
</tr>
<tr bgcolor="#FFFFFF" >
<td width="121" height="38" bgcolor="#9EB6D8"><div align="center"> 管理员名称:</div></td>
<td width="281" align="center" bgcolor="#9EB6D8"><div align="center">
& <input type="text" name="username" size="20" value="<%=rs1("username")%>"
>
</div></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td height="40" bgcolor="#9EB6D8"><div align="center">管理员密码:</div></td>
<td align="center" bgcolor="#9EB6D8"><div align="center">
<input name="password" type="text" value="<%=rs1("password")%>" size="20">
</div></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td colspan="2" bgcolor="#9EB6D8">
<div align="center">
<input type="submit" name="Submit2" value="确定修改" class=input>
</div></td>
</tr>
</table>
</div>
</form>
<div align="center">
<%rs1.close%>
<%end if
set rs1=nothing
rs.close
set rs=nothing
%>
</div>
这个是我改的别人的密码修改的方法.现在本人的水平还有限,不足的地方请多多指教