Jump to content

Doubt on online php quiz


vp

Recommended Posts

 

I just wanted to  develop a web application - an online quiz, in which i need to fetch questions only once & display one at a time as the user clicks the NEXT button. But, in php ,i guess it is difficult to have the questions(data) stored & use it on the event basis(button click)(since its a mere script invocation). Whereas , in asp.net it is easily done, since the data fetched can be stored till the user ends appln. So can u suggest some ways to do it in php......? or asp.net is the only go...?

 

 

Link to comment
https://forums.phpfreaks.com/topic/166589-doubt-on-online-php-quiz/
Share on other sites

Hi

 

Easy enough to do. You still have access to all the back end stuff that .net uses to provide these functions, just that you can chose not to waste machine time and resources using them when not required.

 

Use a session to keep track of the user and then either store the asked questions in a table (indexed on the session id) which would make it easy to use a JOIN to exclude previous asked questions, or more crudely just store the asked questions in a session variable.

 

All the best

 

Keith

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.