I am building a simple quiz program, using PHP and MYSQL.
The quiz is designed to display one question at a time; the questions are multiple-choice (each question has 4
When you ask your question to the user, a question is randomly selected from the database.
Then, the user submits your form, another question is randomly selected, and that's the question you are using to check the answer, instead of the question you asked to the user.
You need to add an hidden input in your form, that contains the question id
And then when you check the answer, be sure to fetch the right question from the database
The code would look like this