📄 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"此学号已经存在,请重新输入!"
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">专业:</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">返回管理区</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 + -