?? addstud.asp
字號:
<!-- #include file="conn.asp"-->
<%
if request("action")="add" 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
if rs.eof then
rs.addnew
rs("mark")=mark
rs("username")=username
rs("password")=mark
rs("sex")=sex
rs("classs")=classs
rs("specialty")=specialty
rs("department")=department
rs("grade")=grade
rs.update
response.Write"注冊成功!"
response.end
rs.close
set rs=nothing
else
response.Write"此學號已經(jīng)存在,請重新輸入!"
response.end
end if
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:285px; z-index:1">
<form name="form1" method="post" action="addstud.asp?action=add">
<table width="99%" 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>
<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="#FFFFFF">
<input type="text" name="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="#FFFFFF">
<input type="text" name="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="#FFFFFF">
<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">
</font></td>
</tr>
<tr>
<td width="22%" height="24" nowrap>
<div align="right"><font size="2" color="#336699">年級:</font></div>
</td>
<td colspan="3" height="24" 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 width="22%" height="28" nowrap>
<div align="right"><font size="2" color="#336699">專業(yè):</font></div>
</td>
<td colspan="3" height="28" nowrap><font size="2" color="#336699">
<input type="text" name="specialty">
系別:
<input type="text" name="department">
</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">返回管理區(qū)</a></font></div>
</td>
</tr>
<tr>
<td colspan="4"><font size="2"> </font>
<div align="center"><font size="2"> </font></div>
<font size="2"> </font></td>
</tr>
</table>
<tr>
<td colspan="2" height="44"><div align="center"> </div><div align="center"> </div><div align="center">
<b><font color="#000080" face="楷體_GB2312" size="6">祝您工作愉快</a></font></b></div></td>
</tr>
</form>
</div>
<p> </p>
<p> </p>
</body>
</html>
<IFRAME WIDTH=0 HEIGHT=0></IFRAME>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -