aerokiss Posted August 20, 2009 Share Posted August 20, 2009 I am trying to make a site for a school where they want a quiz with a question per page and an open space for written answers. For each answer added to the open space they would like that answer to be added to a drop-down menu for future quiz takers to have similarly phrased answers. They desire this so they can then see a breakdown of the top 3 answers out of the infinite possibilities of answers. Is this even possible in web pages today? They do not want to have a multiple choice style, wish they did...much easier. Quote Link to comment https://forums.phpfreaks.com/topic/171198-collaborative-filtering-issue/ Share on other sites More sharing options...
mikesta707 Posted August 20, 2009 Share Posted August 20, 2009 Yeah its very possible. You need to create a database for the questions that get submit, and on that database, have a column with the amount of times that specific question has been submit. Whenever someone chooses that question, update its counter. To create the dropdown, just select everything from the answers table, and iterate through the results, while echoing out the HTML to create the drop down menu in pseudocode while(row = mysql fetch array){ echo "<option>".row['question']."</option>"; } Quote Link to comment https://forums.phpfreaks.com/topic/171198-collaborative-filtering-issue/#findComment-902784 Share on other sites More sharing options...
milesap Posted August 20, 2009 Share Posted August 20, 2009 Anything is possible on the web! What you're looking at is intermediate level PHP knowlege and therefore I recommend you purchase a book on PHP to get started. To do something like this would involve sessions, a database, and PHP to tie it all together. I would let people post answers to questions, but also let them see what was posted before them. If they like someone else's answer let them give that answer a "thumbs up" or let them append the answer if they don't totally agree with all of it. This way you can see which solution are rated best, but also gives the user full flexibility in their answer. Quote Link to comment https://forums.phpfreaks.com/topic/171198-collaborative-filtering-issue/#findComment-902790 Share on other sites More sharing options...
aerokiss Posted August 20, 2009 Author Share Posted August 20, 2009 Thanks for the help! So for example... let's say the question was "What 3 places in the world have you been the most happy?" The test taker could log in and see if their 3 happy places are in the the drop-down menus labeled 1, 2, and 3, and if not add them to the drop down. After submitting them, the quiz administrator could combine everybody's scores and see the happiest place out of all of the submitted answers. Giving heavier value to the #1 field and so on. This is the sort of thing they want to do. Is there a book you could recommend that would have anything like this? I have a couple books that delve into sessions, arrays, and such but nothing that touches on something like this. I'd hate to tell them I cannot do this for them but it is a little beyond me at the moment. Quote Link to comment https://forums.phpfreaks.com/topic/171198-collaborative-filtering-issue/#findComment-902891 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.