save_shijuan.asp

来自「这是一个用ASP写的在线考试系统.特别一点 就是考试试卷有两种考法,一种为系统」· ASP 代码 · 共 58 行

ASP
58
字号


<!--#include file="conn2.asp"-->

<%
'addId=request("shitid")
'addid=Cint(addid)
'tiid1=request("tiid")
'tiid1=cint(tiid1)
dim i 
checkbox=request("checkboxname")
'response.Write(checkbox)
'response.End()
'checkbox=cint(checkbox)
checkbox=replace(checkbox,",",",")

box=split(checkbox,",")
box_count=ubound(box)

'addname=request.QueryString("addname")
'set rst=server.CreateObject("adobc.recordset")
on error resume next 
for i=0 to box_count
shisql="select*from "&Session("addnamet")&" where id in ("&box(i)&")"  '要改的
set rst=conn.execute(shisql)
'response.Write(rst("id"))
'response.End()
'while not rsT.eof
tryId=rst("id")
tryselectT=rst("try_type")
trycent= rst("try_cent")
trysubject=rst("try_subject")
tryselectQ=rst("try_key")
	tryselA=rst("a")
	tryselB=rst("b")
	tryselC=rst("c")
	tryselD=rst("d")
 
  'tryinfoSql="select * from "&session("bname")&" "'where id='"&tryid&"'"    '"&session("shijuan")&"   
  'set rsT=conn.execute(tryinfoSql)  
  'if tryid==rst("id") then
'if not rsT.eof then
	'Session("sa_help")="对不起,这道试题已经有了!请重增加试题!"
	'response.redirect("try_shijuan_list.asp")
'end if
  
	insertSql="insert into "&session("bname")&" values("&tryid&",'"&tryselectT&"',"&trycent&",'"&trysubject&"','"&tryselA&"','"&tryselB&"','"&tryselC&"','"&tryselD&"','"&tryselectQ&"') "
   'rsT.movenext
  'wend 
    set rsT=conn.execute(insertSql)
	next
	rst.close
	'response.End()
	set rst=nothing
	set conn=nothing 
session("sa_help")="上条记录添加完毕!"
response.Redirect("db_shijuan_list.asp")
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?