Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I am quite stuck on figuring out my HTML/PHP homework assignment. The goal is to create a 5-question quiz which will be automatically scored,

Hello,

I am quite stuck on figuring out my HTML/PHP homework assignment. The goal is to create a 5-question quiz which will be automatically scored, and will record the results of all quiz takers. For each, different part we get to, we need to change the functionality of the program to work with the new data we need to add. For this part, I need to use PHP to add a results page which will score the quiz. This page will display the users overall quiz score and show how the user did on each question.

So far, I have a fully-functional, 5-question quiz. Before, it did nothing when clicking "Submit," which was Part 1 completed. But now, when clicking "Submit," it needs to take the user to the PHP page showing the quiz results. I know I'm not doing the logic correctly in my code somewhere with the "get" method perhaps, but I am new to PHP and am quite confused as we didn't go over any specific questions in class pertaining to "if" statements and menu options.

Below is my HTML code:

Disney Quiz

Are you an avid Disney fan? Let's see!

Below is my PHP code corresponding to my HTML code:

Disney Quiz Results

echo "You scored " + $quizScore + " out of 5 questions correctly!" ?>

Right now, when clicking "Submit," it refreshes and gives a blank slate, but when you click "Submit" again, it brings you to the results page (that doesn't work as needed). First, I only need it to submit once after putting in the user's desired answers, and then the PHP results page needs to correspond with the user's responses.

I am very stuck. Can someone please help me with this? It is due tomorrow evening.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions