PLEASE NOTE OTHER SOLUTIONS PROVIDED FOR THIS QUESTION DO NOT WORK! Do not provide the...
80.2K
Verified Solution
Question
Accounting
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.
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
- Unlimited Question Access with detailed Answers
- Zin AI - 3 Million Words
- 10 Dall-E 3 Images
- 20 Plot Generations
- Conversation with Dialogue Memory
- No Ads, Ever!
- Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Other questions asked by students
StudyZin's Question Purchase
1 Answer
$0.99
(Save $1 )
One time Pay
- No Ads
- Answer to 1 Question
- Get free Zin AI - 50 Thousand Words per Month
Unlimited
$4.99*
(Save $5 )
Billed Monthly
- No Ads
- Answers to Unlimited Questions
- Get free Zin AI - 3 Million Words per Month
*First month only
Free
$0
- Get this answer for free!
- Sign up now to unlock the answer instantly
You can see the logs in the Dashboard.