Listing 7: checkform.inc <blockquote> <% Dim Question, Answer, QuizLen, Item, Score, Max, Percentile, Message, Check QuizLen = 1 For Each Item In Request.Form QuizLen = QuizLen +1 Next Score = 0 Max = (QuizLen - 3) /2 For Question = 1 To Max Answer = Request(Cstr(Question) & "a") Check = Right(Answer, Len(Answer) -1) Answer = Left(Answer,1) If Request(Cstr(Question)) = Answer Then Score = Score + 1 Else If Request(Cstr("b2")) <> "" Then Response.Write("<br><br>Your answer to question: " & Question & " is wrong.") Response.Write("The correct answer was: " & Check & "<br>") End If End If Next Percentile = Score/Max * 100 If Percentile > 75 Then If Percentile = 100 Then Message = "a perfect" Else Message = " a brilliant" End If Else If Percentile > 50 Then Message = "an average" Else Message = "a below par" End If End If Percentile = FormatPercent(Score/Max) Response.Write( "<br><br>You have " & Score & " correct answers from a possible " & Max) Response.Write( ".<br><br>Giving you " & Message & " score overall of: " & Percentile & "<br><br>") %> </blockquote>