Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have question database which is saved in mysql table. I want to show the questions to users one by one with next and previous button using bootstrap modal. User can enter answers and then click for next question.

How can i develop this using php, ajax, bootstrap modal, mysql.

What I have tried:

I can able to get single data from mysql to bootstrap modal. But unable to create next and previous questions.
Posted
Updated 18-Jun-21 4:03am

1 solution

There are way too many questions to be able to answer them here.

You need to:
1. Create a table in the db for questions and what order they should appear.
2. Create a table for answers that relates to the questions table and also stores the user. Or you could create a top level answers table and then a separate table 1 to many that stores the answers for each question. The top level table will relate to who answered.
3. Write code to display the questions.
4. Put code in previous and next buttons to find the previous or next question and check if they already answered it so you can re-load their answers.

That's just a summary.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900