⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add.asp

📁 在线考试系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<% 
if session("pass")<> 1 then
response.redirect "login.asp"
else 
end if
if request("q")<>"" then 
q=Request("q")
a=Request("a")
b=Request("b")
c=Request("c")
d=Request("d")
ans=Request("ans")
set rs=server.createobject("adodb.recordset")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& Server.MapPath("exercise.mdb")
sql="insert into test (question,a,b,c,d,ans) values('"&q&"','"&a&"','"&b&"','"&c&"','"&d&"','"&ans&"')"
set rs=conn.execute(sql)

end if
%>
<body>
<form>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
  <tr> 
      <td width="83%">考题:
        <input name="q" type="text"> 
        
        答案:
        <input name="ans" type="text">
        </td>
    <td width="17%"><input name="Submit" type="submit" value="修改"></td>
  </tr>
  <tr> 
      <td height="21" colspan="2">A: 
        <input name="a" type="text">
        </td>
  </tr>
  <tr> 
      <td colspan="2">B:
        <input name="b" type="text">
        </td>
  </tr>
  <tr> 
      <td colspan="2">C:
        <input name="c" type="text">
        </td>
  </tr>
  <tr> 
      <td colspan="2">D:
        <input name="d" type="text">
        </td>
  </tr>
</table>
  <br>
  <a href="adm.asp">点击返回</a>
</form>
</body>
</html>

⌨️ 快捷键说明

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