Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Jan
    Jan is offline
    Regular Coder
    Join Date
    Jul 2002
    Location
    Finland
    Posts
    204
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to make a questionnaire?

    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!


    ~Jan

  • #2
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #3
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    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.

  • #4
    Jan
    Jan is offline
    Regular Coder
    Join Date
    Jul 2002
    Location
    Finland
    Posts
    204
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


    ~Jan

  • #5
    Jan
    Jan is offline
    Regular Coder
    Join Date
    Jul 2002
    Location
    Finland
    Posts
    204
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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. 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!


    ~Jan

  • #6
    Jan
    Jan is offline
    Regular Coder
    Join Date
    Jul 2002
    Location
    Finland
    Posts
    204
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi!

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

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

    ~Jan

  • #7
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe one of these 700+ tutorials can get you started.
    http://www.hotscripts.com/PHP/Tips_a...als/index.html

    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.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •