Show next database values on button click

have made a quiz, but instead of showing all of the questions at once I want to show them 1 by 1. So question 1 is shown first and when the answer is submitted question 2 is shown etc. The questions and multiple choice answers are shown on the page from the database with sql statements. But I can’t seem to manage it to show the questions after each other.The way the databasebase is setup is, there is a question with 4 options and a correct answer column. I want to show the question and the 4 options that go with that question. This is the code I use to show all the questions with the answers from the database, it would be nice if someone could help me with a way to show them one by one: https://gist.github.com/anonymous/9c3f33e6c74a2b4627542a846bd8666a

Post the code on the forum please. If you are using MySQL you will want to do a pagination type query.

Sponsor our Newsletter | Privacy Policy | Terms of Service