View Full Version : How to make a questionnaire?

04-27-2004, 01:26 PM
Hey all!

I'd be really grateful if someone could help me with making a questionnaire (in PHP). The questionnaire would look something like this:

1. Question
1a. answer
1b. answer
1c. answer....

2. Question
1a. answer

How would I do this the best way, so that gathering the info from the questionnaire would be the easiest? The info gathered from the questionnaire should be easy to analyze. There would be about 20-30 questions, and quite many participants. Would using a MySQL database be the wisest?

Please help me with this, preferably with examples! Thanks in advance!


04-27-2004, 01:40 PM
Yes, using a MySQL database would be wisest.

I'd like to discuss more and maybe show some examples right now, but I am about to head to school.

- Stevie

04-27-2004, 02:09 PM
I've set up something similar for a "Survey Manager" system I created. The basic database structure is something like this:

TABLE questions
questionID int auto_increment PK
questionText varchar(255)
questionType int
lastUpdated datetime

TABLE answers
answerID int auto_increment PK
questionID int (FK questions.questionID)
answerText varchar(255)
lastUpdated datetime

TABLE responses
responseID int auto_increment PK
questionID int (FK questions.questionID)
answerID int (FK answers.answerID)
responseDate datetime

The question and answers tables contain the information displayed on the form (the questions.questionType is used to determine if it's a drop down, checkbox, radio button, text field, or text area)

The responses table simply compiles all the responses. I can then use COUNT() sql queries to analyze the results.

This is just the basics, but should get you started.

04-28-2004, 08:51 AM
Thanks for your replies! I'm really new to all this, so could you kindly show me some examples how to accomplish this? I wouldn't need to be anything complicated, just something to get me started.

I know very little about PHP, let alone MySQL databases. So I would need some newbie help :D


04-28-2004, 02:40 PM
Hey again!

I've been trying to find examples of questionnaires on the web, but can't seem to find any... I really hope someone could show me how to do this. :confused: Actually, I'd be very thankful if someone could even show me how to do a simple form, where the answers are sent to an e-mail address. All help is greatly appreciated!


05-04-2004, 09:08 PM

Come on, isn't there anyone who could help me? I've been looking all over, but can't seem to find anything! So please, if someone could help me even a little... :confused:

bcarl314: Could you show me an example of your suggestion? Thanks!


05-04-2004, 09:54 PM
Maybe one of these 700+ tutorials can get you started.

There are 2 tuts intere about setting up a poll or voting feature so i'd check them out.

We can help you if you have specific questions but i fear that most people here wount have time to walk you through it.