Click here to Skip to main content
15,921,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to get next resultset row in window reload or click event.How can we repeat next function in PHP Mysql

Example:
While We are starting an examination we got first question.After clicking next button we got next question from db..
Posted

1 solution

1 - Load All Questions and increment through them (w/javaScript, for example). Keep track of index on client (least resource consuming). Store answers in parallel array. Upload to server at appropriate times.
OR
2 - AJAX to load the Question and then Save answer procedure call next question. Only current index need be stored. Index of current item gives reference value to tag answer and allow request of next index in your question table.

Allowing forward/reverse is a bit easier with (1).
 
Share this answer
 
v2

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