Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.