Question
PLEASE NOTE OTHER SOLUTIONS PROVIDED FOR THIS QUESTION DO NOT WORK! Do not provide the same solution copy and paste from other questions or you
PLEASE NOTE OTHER SOLUTIONS PROVIDED FOR THIS QUESTION DO NOT WORK! Do not provide the same solution copy and paste from other questions or you will be downvoted.
trivia.php will display a trivia question (from a text file) and provide a form with a textbox for the user to type their guess. The form will submit back to itself (trivia.php). You will load your trivia questions from the provided triviaQuestions.txt file. Please note that there is one question and answer per line. These are separated by a \t character. Your program needs to allow for any number of questions in trivQuestions.txt. You must use the session to manage the game progress data. You will start by displaying the first question to the user, and after they give a non-empty response, move on to the second question, and so-forth. Provide a progress indicator to the user. For example: Question 6 of 8. When the user has completed all the questions, display a table for the results. Each row of the output table will contain the question number, the question text, the correct answer, and the answer the user typed. If the user got it correct, change the background-color of the row to light green, else change the background color to light red. Display the percentage of answers that they got correct. At any time the user can restart the game by clicking a hyperlink labeled Restart. This will bring them back to the first question, and 0 their score.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started