欢迎光临
我们一直在努力

网络考场(16)(转)tselectsub.asp

建站超值云服务器,限时71元/月

<%@ language=vbscript %>
<%response.buffer=true%>
<html>
<head>
<meta name="generator" content="microsoft visual studio 6.0">
</head>
<body bgcolor=azure>
<%
if request.querystring("act")="add" then
    如果请求加入试题内容,则form1提交的页面为taddquestion.asp
    response.write "<form action=taddquestion.asp method=post id=form1 name=form1>"
else
    如果请求修改试题内容,则form1提交的页面为teditquestion.asp
    response.write "<form action=teditquestion.asp method=post id=form1 name=form1>"
end if
%>
<p>选择所要修改/加入题目的课程</p>
<p><select id=select1 name=selsub
style="height: 21px; width: 204px">
<%
set conn=server.createobject("adodb.connection")
conn.connectionstring="dsn=testsys"
conn.open
从存储课程的表subinfo中选择teachid等于当前教师编号的记录
strsql="select * from subinfo where teachid=" & session("teachid") & ""
set mrs=conn.execute(strsql)
while not mrs.eof
将所有的课程加入到select中
    response.write "<option>" & mrs("sub")
    mrs.movenext
wend
关闭并清空数据库连接对象
conn.close
set conn=nothing
%>
</select>
<input id=submit1 name=submit type=submit value=确定></p>
</form>
</body>
</html>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 网络考场(16)(转)tselectsub.asp
分享到: 更多 (0)

相关推荐

  • 暂无文章