asp制作网站教程_用ASP制作在线测试

时间:2013-12-12  来源:世界杯在线直播  阅读:
<%
CurQ = Request.Form("CurQ")
Answ = Request.Form("Answ")
correct=Request.Form("Correct")
wrong=Request.Form("Wrong")
"Poor Man"s IsNull Code goes here
If PoorMansIsNull(CurQ) Then
CurQ = 1
correct = 0
wrong = 0
End If
If PoorMansIsNUll(Answ) Then
CurQ = CurQ + 1
If CurQ > (Your maximum number of questions) Then
%>

Congratulations. You have completed this test. You missed <%=wrong%>
questions,
but got <%=correct%> questions right. That is equivilent to a
<%=(correct/(max#ofQs)%>%.
Thank you for doing the test.
<% End If %>
<% set conntemp = server.createobject("adoDB.Connection")
set myDSN = "(your DSN info goes here)
conntemp.Open myDSN
set mySQL = "SELECT * FROM QUESTIONS WHERE QuestionID=" & CurQ
set rsTemp= conntemp.Execute(mySQL)
%>

Question Number <%=rsTemp("QuestionID")%>



>
Your question is <%=rsTemp("Question")%>

Answer:




<% Else %>
<% set conntemp = server.createobject("adoDB.Connection")

asp制作网站教程_用ASP制作在线测试

http://m.bbyears.com/wangluoxinxianshi/2658.html

推荐访问:
相关阅读 猜你喜欢
本类排行 本类最新