📄 modifylogin.asp
字号:
<% @language=vbscript%>
<!--#include file="conn.asp"-->
<%
log_name=Request.Cookies("name") '读cookie
if log_name="" then
error_str="你还没登录!"
conn.close
Response.write error_str
Response.End
end if
if Request("permit")="" then
Response.Redirect "index.asp?flag=yes"
end if
%>
<%
if Request.Form("Submit")<>""then
mas_psw=trim(Request.Form("pass"))
mas_name=trim(Request.Form("name"))
str="update login set mas_name='"&mas_name&"',mas_psw='"&mas_psw&"' where id=1"
conn.execute str
Response.write "<font color=red>成功!</font><br>"
Response.End
end if
str="select * from login where id=1"
set rs=conn.execute(str)
%>
<html>
<head>
<title>户口管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p> </p>
<hr width="90%">
<div align="center">管理员登录--姓名密码修改<br>
</div>
<hr width="90%">
<br>
<form name="form1" method="post" action="modifylogin.asp?permit=ok">
<table width="720" border="1" height="176" align="center">
<tr>
<td width="229" height="54">
<div align="right">姓名:</div>
</td>
<td width="475" height="54">
<div align="center">
<input type="text" name="name" maxlength="20" value=<%=rs.fields("mas_name")%>>
</div>
</td>
</tr>
<tr>
<td width="229" height="55">
<div align="right">密码:</div>
</td>
<td width="475" height="55">
<div align="center">
<input type="password" name="pass" maxlength="20" value=<%=rs.fields("mas_psw")%>>
</div>
</td>
</tr>
<tr>
<td width="229" height="55">
<div align="right">
<input type="submit" name="Submit" value="提交">
</div>
</td>
<td width="475" height="55">
<div align="center">
<input type="reset" name="Submit2" value="重置">
</div>
</td>
</tr>
</table>
</form>
<p> </p>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -