?? editstud.asp
字號:
<!-- #include file="conn.asp"-->
<%
if request("action")="editstud" then
mark=trim(request("mark"))
username=trim(request("username"))
sex=trim(request("sex"))
classs=trim(request("classs"))
specialty=trim(request("specialty"))
department=trim(request("department"))
grade=trim(request("grade"))
sql="select * from users where mark='"&mark&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,3,3
rs("username")=username
rs("sex")=sex
rs("classs")=classs
rs("specialty")=specialty
rs("department")=department
rs("grade")=grade
rs.update
rs.close
set rs=nothing
end if
%>
<html>
<head>
<title>修改學生注冊信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#AACCFF" text="#000000"><script ></script>
<div id="Layer1" style="position:absolute; left:161px; top:36px; width:469px; height:275px; z-index:1">
<form name="form1" method="post" action="editstud.asp?action=editstud">
<table width="101%" border="1" cellpadding="0" cellspacing="0" height="281">
<tr>
<td colspan="4" height="25"> <div align="center"><font size="2" color="#336699">學生注冊信息修改</font></div></td>
</tr>
<%
mark=trim(request("mark"))
sql="select * from users where mark='"&mark&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,3,3
if rs.eof then
response.write "對不起,沒有找到你輸入的學號!"
response.end
else
%>
<tr>
<td width="22%" height="24" nowrap> <div align="right"><font size="2" color="#336699">學號:</font></div></td>
<td width="31%" height="24" nowrap><font size="2" color="#336699">
<input name="mark" type="text" size="15" value="<%=rs("mark")%>">
</font></td>
<td width="20%" height="24" nowrap> <div align="right"><font size="2" color="#336699">姓名:</font></div></td>
<td width="27%" height="24" nowrap><font size="2" color="#336699">
<input type="text" name="username" value="<%=rs("username")%>">
</font></td>
</tr>
<tr>
<td width="22%" height="24" nowrap> <div align="right"><font size="2" color="#336699">性別:</font></div></td>
<td width="31%" height="24" nowrap><font size="2" color="#336699">
<select name="sex">
<option selected>男</option>
<option>女</option>
</select>
</font></td>
<td width="20%" height="24" nowrap> <div align="right"><font size="2" color="#336699">班級名稱:</font></div></td>
<td width="27%" height="24" nowrap><font size="2" color="#FFFFFF">
<input type="text" name="classs" value="<%=rs("classs")%>">
</font></td>
</tr>
<tr>
<td width="22%" height="20" nowrap> <div align="right"><font size="2" color="#336699">專業:</font></div></td>
<td height="20" nowrap><font size="2" color="#FFFFFF">
<input name="specialty" type="text" value="<%=rs("specialty")%>" size="15">
</font></td>
<td height="20" nowrap><div align="center"><font color="#336699" size="2"> 系別:
</font></div></td>
<td height="20" nowrap><font size="2" color="#FFFFFF">
<input type="text" name="department" value="<%=rs("department")%>">
</font></td>
</tr>
<tr>
<td width="22%" height="20" nowrap> <div align="right"><font size="2" color="#336699">年級:</font></div></td>
<td colspan="3" height="20" nowrap><font size="2" color="#FFFFFF">
<select name='grade' size=1 class=smallselsect style='BACKGROUND-COLOR:#ffffff;font-family: 宋體; font-size: 9pt;'>
<option value=2001>2001</option>
<option value=2002>2002</option>
<option value=2003>2003</option>
</select>
</font></td>
</tr>
<tr>
<td colspan="4" height="37" nowrap> <div align="center"><font size="2">
<input type="submit" name="Submit" value="確定">
</font><font size="2">
<input type="reset" name="Submit2" value="取消">
</font><font size="2" color="#FFFFFF"> </font><font size="2"><a href="admin.asp">返回管理區</a></font></div></td>
</tr>
<tr>
<td colspan="4"><font size="2"> </font> <div align="center"><font size="2">
</font></div>
</td>
</tr>
</table>
</form>
</div>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<p> </p>
<p> </p>
</body>
</html>
<IFRAME WIDTH=0 HEIGHT=0></IFRAME>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -