B- Quiz

Create a three-question quiz website using PHP. The website should:

  • Have a start page that begins the quiz and sets the score to 0
  • Display each question on a separate page
  • Display the user’s current score on each question page
  • Use a form with radio buttons for each multiple-choice question
  • Use POST to send the selected answer to the next page
  • Increase the score by 1 when an answer is correct
  • Use a session variable to store the score as the user moves between pages
  • Display the score on each question page
  • Display the user’s final score out of 3 on a results page
  • Provide a link to restart the quiz
if (isset($_POST["answer"])) {
    if ($_POST["answer"] == "Paris") {
        $_SESSION["score"]++;
    }
}