📄 adminsubjectsave.asp
字号:
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
.STYLE2 {
font-family: "宋体";
color: #000000;
}
.STYLE3 {color: #000000}
-->
</style>
<!--#include file="conn.inc"-->
<%
exam_subject=trim(request("exam_subject"))
sql="select * from subject_info where SubName = '"&exam_subject&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if(rs.eof) then
isAdd = 1
else
isAdd = 0
end if
rs.close
set rs= nothing
if isAdd = 1 then
sql="select * from subject_info"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
rs.addnew
'增加新的科目
rs("SubName")=exam_subject
rs.update
response.redirect "adminsubject.asp"
else
%>
<td colspan="2">
<font color="#FF0000">error:添加科目重复</font>
<a href="adminsubject.asp">返回</a>
<font color="#FF0000">重新添加</font>
</td>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -