📄 addshitichick.asp
字号:
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
cmd="select * from test"
rs.open cmd,conn,1,3
dim tihao,timu,a,b,c,d,zhengque
tihao=request.form("tihao")
timu=request.Form("timu")
a=request.Form("A")
b=request.Form("B")
c=request.Form("C")
d=request.Form("D")
zhengque=request.Form("zhengque")
%>
<%
if timu="" or a="" or b="" or c="" or d="" or zhengque="" or tihao="" then
response.Write("<script>alert('添加信息填写不完整,请重新填写');window.location.href('addshiti.asp')</script>")
response.End()
end if
%>
<%
set rs1=server.createobject("adodb.recordset")
cmd="select * from test where id like '"&tihao&"'"
'response.write cmd
'response.end
rs1.open cmd,conn,1,1
if not rs1.eof then
response.Write("<script>alert('已存在该试题');window.location.href('addshiti.asp')</script>")
response.end
else
rs.addnew
rs("id")=tihao
rs("question")=timu
rs("A")=a
rs("B")=b
rs("C")=c
rs("D")=d
rs("ans")=zhengque
rs.update
response.Write("<script>alert('添加考题成功');window.location.href('addshiti.asp')</script>")
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -