ASP考试系统问题!
大家好,我想问个ASP考试系统的问题,在做题页面做完题,点提交,进入评分界面,如何将做错的题目显示出来?现在我做的只是显示出做错题的答案,不能显示出错题,请大家帮帮我!可以给我写写代码,谢谢以下是评分界面的代码:(数据库中题目存放的字段是TRY_SUBJECT)
<!--#include file="include/conn.asp"-->
<!--#include file="safe.asp" -->
<%
if Session("stuFlag")<>1 then
server.Transfer("default.asp")
end if
%>
<html>
<head>
<title>::::欢迎光临在线考试系统:::::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META content=fixty设计 name=description>
<META content="fixty@ name=author>
<link href="css/Style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="49" height="35" background="images/HOME_BG3.GIF"> </td>
<td height="35" background="images/HOME_BG9.GIF"> <div align="center"><span class="Xsmall"><font color="#FF0000">恭喜你完成本次考试任务</font></span></div></td>
<td width="13" height="1"><img src="images/home_bg8.gif" width="13" height="35"></td>
</tr>
<tr>
<td width="49" background="images/HOME_BG1.GIF"> <br> </td>
<td background="images/home_bg10.gif">
<blockquote class="Xsmall">
<%
dim PD_TJ(40),XZ_TJ(60),PD_FS,PD_DA(40),XZ_DA(60)
PD_FS = 0
XZ_FS = 0
response.write(Session("NameT_Stu")&"你好,本次考试你的情况如下:<br><br>")
response.Write "<font color = #ff0000>★ 判定题中做错的有:</font><br><br>"
for d1 = 1 to 40
PD_TJ(d1) = request("PD"&d1)
PD_DA(d1) = request("PD_DA"&d1)
if PD_TJ(d1) = "" then PD_TJ(d1) = "D"
if PD_TJ(d1)=PD_DA(d1) then
PD_FS = PD_FS + 1
else
response.Write "<font color = ff0000>"&d1&"</font>题 答案是"&PD_DA(d1)&" | "
end if
next
response.Write "<br><font color = 0000ff>判断题:"&PD_FS&"分<br></font>"
response.Write "<br><font color = ff0000>★ 选择题中做错的有:</font><br><br>"
for d2 = 1 to 60
XZ_TJ(d2) = request("XZ"&d2)
XZ_DA(d2) = request("XZ_DA"&d2)
if XZ_TJ(d2) = "" then XZ_TJ(d2) = "D"
if XZ_TJ(d2)=XZ_DA(d2) then
XZ_FS = XZ_FS + 1
else
response.Write "<font color = ff0000>"&d2&"</font>题错,正确答案是"&XZ_DA(d2)&" | "
end if
next
response.Write "<br><font color = 0000ff>选择题:"&XZ_FS&"分</font>"
response.Write("<br><font color = 0000ff>总得分:"&XZ_FS+PD_FS&"分</font>")
%>
</blockquote></td>
<td width="13" background="images/home_bg7.gif"> </td>
</tr>
<tr>
<td width="49" height="42" background="images/HOME_BG2.GIF"> </td>
<td height="22" background="images/home_bg10.gif" bgcolor="#FFFFFF" class="Xsmall"><div align="center"><a href="javascript:window.close()">[关闭窗口]</a></div></td>
<td width="13" height="22" background="images/HOME_BG7.GIF"> </td>
</tr>
<tr>
<td height="12" background="images/HOME_BG4.GIF"> </td>
<td background="images/HOME_BG5.gif"> </td>
<td background="images/HOME_BG6.GIF"> </td>
</tr>
</table>
</body>
</html>