Retrieve and add the values from a Quiz form and display the results.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • geckobtz
    New Member
    • Apr 2007
    • 1

    Retrieve and add the values from a Quiz form and display the results.

    Hi Guys,

    I am trying to build a page in ASP/MSsql with the aid of dreamweaver, the page contains total of 6 Questions, each question has 3 choices, of which one of the choice contains the right answer with a hidden value = to 1 and the wrong choice hidden value = to 0.
    What i am trying to achieve is to collect the values and insert it to a database and at the same time display the results on the confirmation page.
    Collecting data’s and inserting to the database is not a problem which i am able to do it. The area that i am stuck is the possibility to collect the values, adds the number of right answers (e.g. 1+1+0+0+1+0 = 3) and displays it on the confirmation page.
    I was thinking if it was possible to use cookies for this, like storing the values Q1 = 1 when it is correct and Q1 = 0 when it is wrong while submitting the form and the confirmation page retrieves the values from the cookies, addition the number of right answers ( Q1+Q2+….Q6) and display it on the page.
    E.g. the confirmation page displays: Your score is 2 out of 6.

    Any help is much appreciated.
    GB
  • iam_clint
    Recognized Expert Top Contributor
    • Jul 2006
    • 1207

    #2
    if you already wrote them to the db then your script knows what the values are i don't see why you don't just write them to the page?

    Comment

    Working...