% Option Explicit On Error Goto 0 %> <% Dim objRequest Dim objForm Dim objErrorList Dim strQuestion1 Dim strQuestion2 Dim strQuestion3 Dim strQuestion4 Dim strQuestion5 Dim strQuestion6 Dim intResults Set objRequest = New ClassRequestData Set objForm = New ClassFormElements Set objErrorList = New ClassErrorList If (objRequest.GetInteger("btnRetry.x", 0, 1, Null) > 0) Then Session("QuizCompleted") = "" elseIf (objRequest.GetInteger("btnSubmit.x", 0, 1, Null) > 0) Then 'request all values strQuestion1 = objRequest.GetString("scoville", Null, 2, 2) strQuestion2 = objRequest.GetString("birdseye", Null, 2, 2) strQuestion3 = objRequest.GetString("scotch", Null, 2, 2) strQuestion4 = objRequest.GetString("made", Null, 2, 2) strQuestion5 = objRequest.GetString("recipe", Null, 2, 2) strQuestion6 = objRequest.GetString("releases", Null, 2, 2) 'do validations if IsNull(strQuestion1) then objErrorlist.add("Please answer question 1.") if IsNull(strQuestion2) then objErrorlist.add("Please answer question 2.") if IsNull(strQuestion3) then objErrorlist.add("Please answer question 3.") if IsNull(strQuestion4) then objErrorlist.add("Please answer question 4.") if IsNull(strQuestion5) then objErrorlist.add("Please answer question 5.") if IsNull(strQuestion6) then objErrorlist.add("Please answer question 6.") if objErrorlist.count = 0 then intResults = 0 if strQuestion1 = "1b" then intResults = intResults + 1 if strQuestion2 = "2c" then intResults = intResults + 1 if strQuestion3 = "3b" then intResults = intResults + 1 if strQuestion4 = "4a" then intResults = intResults + 1 if strQuestion5 = "5c" then intResults = intResults + 1 if strQuestion6 = "6b" then intResults = intResults + 1 If (Session("QuizCompleted") = "") Then select case intResults case 0 Session("QuizCompleted") = "cold" case 1 Session("QuizCompleted") = "notsohot" case 2 Session("QuizCompleted") = "cool" case 3 Session("QuizCompleted") = "warm" case 4 Session("QuizCompleted") = "medium" case 5 Session("QuizCompleted") = "hot" case 6 Session("QuizCompleted") = "xxxhot" end select End If response.redirect "about_info2.asp" end if end if %>