后台用户只有一个如何填加更多管理用户(不用分管理级别)
pwd.asp 内容如下<!--#include file="qx.asp"-->
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("date/user.asp")
%>
<%
exec="select * from reg"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<table width="855" border="0" cellspacing="0" cellpadding="0">
<%do while not rs.eof%>
<tr>
<td width="329">
<td width="102">
<font class=main>用户名:</font>
<td width="98">
<form method="POST" action="pwdchange.asp">
<input type="text" name="name" size="20" value="<%=rs("name")%>">
<td width="327">
</tr>
<tr>
<td width="329">
<td width="102"><font class=main>
密码:</font>
<td width="98">
<input type="text" name="password" size="20" value="<%=rs("password")%>">
<td width="327">
</tr>
<tr>
<td width="329">
<td width="102">
<p align="right">
<input type="submit" value="提交" name="B1">
<td width="98">
<input type="reset" value="重写" name="B2">
<td width="327">
<input type="hidden" name="id" value="<%=rs("id")%>">
</tr>
</table>
<%
rs.movenext
loop
%>
调用PWDCHANGE.ASP内容如下
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("date/user.asp")
%>
<!--#include file="qx.asp"-->
<%
exec="select * from reg where id=1" (此处限制了ID=1的管理用户,我删除这个条件在修改密码的时候也是修改第1个管理用户密码)
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,3
rs("name")=request.form("name")
rs("password")=request.form("password")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("<script language=JavaScript>{window.alert('修改成功,页面关闭:)^_^!');window.close();}</script>")
'response.write("<script language=JavaScript>{window.alert('修改成功!');window.location.href=""login_ok.asp"";}</script>")
'response.write("zhaoyuan banquansuoyou")
'response.redirect "login_ok.asp"
%>
我是菜鸟 希望各位朋友能帮帮忙 。 填加管理用户我是直接从DATE/USER.ASP 这个数据库里直接填加的。