i am retrieving qoestion from database.i want that it can display one by one by using next button. at last question the button becomes submit. how it can be possible ?please help me i have tried it so many time but i cant.
my database is ‘surveyTest’ and table is ‘questions’.
There are a couple ways to go about it. Which way you choose depends on whether you just want basic functionality or more advanced options like being able to go back to a previous question, flagging questions, or skipping questions.
The simplest way way is to put all your questions and answers into an array, get a total count and pop them out of the array as you select each question/answer out of the array utilizing the the count number to display a particular Q&A. As you go through the questions, just count how many elements are left in the array. When there are none left, you are at the last question.
To see a more advanced way, go to http://myexam.us/testing/
Login: username/password