📄 change.asp
字号:
<!-- #include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改</title>
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
}
-->
</style>
<%
if session("username")="" then
response.write "<script language=javascript> alert('用户尚未登陆,请登陆!');location.href('index.asp'); </script>"
response.end
end if
%>
</head>
<center>
<body>
<br>
<%
set rsc=server.createobject("adodb.recordset")
sqlc="select * from info where username='"&session("username")&"' and password='"&session("password")&"'"
rsc.open sqlc,conn,1,1
username=rsc("username")
password=rsc("password")
sex=rsc("sex")
qq=rsc("qq")
mail=rsc("mail")
add=rsc("add")
set rsc=nothing
session("username")=rsc("username")
if session("username")="" then
response.Redirect("index.asp")
end if
%>
<form name="form1" method="post" action="change.asp?ac=ch">
<table width="39%" height="105" border="1" >
<tr>
<td width="27%" height="30" bgcolor="#00FF00">用户名:</td>
<td width="73%" height="30" bgcolor="#00FF00"><input name="username" type="text" id="username" value="<%=username%>">
*</td>
</tr>
<tr>
<td height="30" bgcolor="#00FF00">密 码:</td>
<td height="30" bgcolor="#00FF00"><input name="password" type="text" id="password" value="<%=password%>">
*</td>
</tr>
<tr>
<td height="30" bgcolor="#00FF00">性 别:</td>
<td height="30" bgcolor="#00FF00"><input name="sex" type="text" id="sex" value="<%=sex%>"></td>
</tr>
<tr>
<td height="30" bgcolor="#00FF00">QQ:</td>
<td height="30" bgcolor="#00FF00"><input name="qq" type="text" id="qq" value="<%=qq%>"></td>
</tr>
<tr>
<td height="30" bgcolor="#00FF00">Mail:</td>
<td height="30" bgcolor="#00FF00"><input name="mail" type="text" id="mail" value="<%=mail%>"></td>
</tr>
<tr>
<td height="30" bgcolor="#00FF00">地 址:</td>
<td height="30" bgcolor="#00FF00"><input name="add" type="text" id="add" value="<%=add%>"></td>
</tr>
<tr>
<td bordercolor="#000000" bgcolor="#FF00FF"> </td>
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="修改">
<a href="change.asp?se=y" target="_self"><strong>退出系统</strong></a></td>
<% if strcomp(request.QueryString("se"),"y")=0 then
session("username")=""
response.Redirect("index.asp")
end if
%>
</tr>
</table>
</form>
<%
response.write "<a href='show.asp'>学生管理</a>|<a href='sushe.asp'>宿舍管理</a>"
if strcomp(request.QueryString("ac"),"ch")=0 then
set rs=server.createobject("adodb.recordset")
sql="select * from info where username='"&session("username")&"'"
rs.open sql,conn,1,3
rs("username")=request.Form("username")
rs("password")=request.Form("password")
rs("mail")=request.Form("mail")
rs("sex")=request.Form("sex")
rs("qq")=request.Form("qq")
rs("mail")=request.Form("mail")
rs("add")=request.Form("add")
rs.update
set rs=nothing
response.Write"<br><br>修改完成!"
end if
%>
</body>
</center>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -