hi

i'm designing an online evaluation application using php. i was asked to add a feature that enables a user if unable to finish anwering questions can save his/her progress and continue when he/her next logs in.
basically i have no idea how to even start.

thnx

You can have a field in your table to store the total questions answered by the user in bit format.
For example, if there are 10 questions and the user has answered 4 of it, save, 1111000000 to the table. Then, when the user logs in next time, show only questions starting from 5th. This way, even if the user has answered his questions randomly, like, 1st, 3rd, 5th and 6th, you will know which questions he has answered and which questions he has not ! :-/ Umm..If the user has to answer the questions sequentially, then, you can directly save the question number to the table!

You could also create a new table for saved form data and then serialize your POST or GET array depending on how you're passing your form data. Then store the serialized data in the table and relate it to your form in a way that makes sense to your code.

Then you can always recover everything the user has entered and clear/cleanup your saved form data without affected submitted form data and you won't end up with partial form submissions etc.

http://us2.php.net/serialize

hi

what i did was i stored the answers in a table where the columns had nulls so that if a question wasnt answered the db can still accept it, then i used some logic to check whether the user hadnt completed the form and pull the answers from the db, my problem now is how to get the values and check the radio buttons of the answers that the user answered earlier

thnx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.