Any idea on this, how to build? (Quiz-App)


I’m trying to build a Quizapp like a gameshow. So the users are only seeing buttons and the question and the quizmaster have some more settings. (The users have only the initial view - That’s already build)

What i now want to do:
I want to be able to click on a Question in the list and then the Question shown at the user should be the clicked one. And if i click on the next question, it should be changed to the new one. (same thing with the answers) But i also want to be able to click on a next or a previous button, to get to the next entry (question and answers) in database or back to the last one.

Any ideas on it?

// first post actualized…

I already had the idea that if i click on the Quizentry on the list, it creates an extra record in another database with exact same question and answers as the clicked entry and automatically delete the older entry in database. So that the actual Question shown at the user is changed with the new one i choosed.

But i had no idea how to set it up to delete automatially the old entry or all entries in this database and create the new one at the same time. And i also had no idea how to set up this with the previous and next button.


Well, in general if you want to do a “previous/next” thing, you need to somewhere (in an app variable for example) keep a list of the ids of data/pages/something you want to go back and forward to, and have on the page the information to know which index the current page is (either in a page variable or by using the id of the data or whatever to find the index in the list).

I’m not sure I understand the way you’re creating data, but I would probably not delete it until the quiz is over, and use the list described above to know which items to delete.