Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   How to display questions in batch (https://www.warriorforum.com/programming/905367-how-display-questions-batch.html)

heroecitadel 20th February 2014 11:41 AM

How to display questions in batch
 
Hi everyone,
I'm creating a computer based test application(cbt) with php and mysql.
I want to ask. How do i display the questions in batches, like, Mathematics, how do i display 15 questions in separate pages when i have a total of 50 questions in mathematics and still be able to submit all of them with one input button?

David Beroff 20th February 2014 03:20 PM

Re: How to display questions in batch
 
The easiest thing to do is to pass the prior responses as hidden fields. Better to manage them in your database for a given session, but that's not absolutely necessary.

sautaja 21st February 2014 07:51 AM

Re: How to display questions in batch
 
You can have a few DIVs, where each div represents a page and has 15 questions. All divs are hidden by default except the first one. Then make a 'Next' button below each div and have a click event listener for it. Once clicked, the script will hide all DIVs and unhide the next DIV, or page. At the last page user can simply do a post submission.

heroecitadel 21st February 2014 10:13 AM

Re: How to display questions in batch
 
Thank you very much sautaja, that was great!


All times are GMT -6. The time now is 03:40 PM.