A PHP/mySQL Web Survey..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • GTF

    #1

    A PHP/mySQL Web Survey..

    PHP Web Survey Idea..

    I have been given an opportunity to create a web based survey. This is a
    fairly lengthy survey of 60 pages on paper (various multiple choice and
    free form).

    These are the Requirements:

    -Provide a web interface to a database
    -Database stores the data (duh), but the capacity to extract the data
    into an Excel sheet.

    The survey is being done by 20-30 different organizations.

    My immediate thoughts were to use PHP and mySQL for this project. These
    are my ideas for database setup (using mysql):

    Here are my tables:

    questions
    ---------------
    fields: QID# (primary key), QuestStr, Qtype (multiple choice, t/f, or
    freeform)

    answers
    ---------------
    fields: WorkerID# (primary key), QID# (foreign key), AnswerStr,
    CommentStr

    possible_answer s (for multiple choice)
    -----------------
    fields: QID# (primary key), answerA, answerB, answerC, answerD

    The other tricky part is that the 2nd section of this survey can, in
    some instances, be performed by more then one person. To handle this, I
    was thinking the first part of the survey would give the survey person a
    control panel of sorts (the original survey person would know how many
    people would be doing section 2 in his/her respective organization), to
    determine how many people will be contributing to this particular
    survey.

    I was thinking this table would take care of this problem:

    users_access
    -----------
    fields: WorkerID#(prima rykey), allaccess (integer value: 0 - no access,
    1 - all questions, 2 - limited questions 20 to 40, 3 - lim. questions 30
    to 50)


    Obviously the WorkerID#'s must be given to the original survey people (a
    login/password page most likely). Upon loggin in, they must determine
    how many people in their respective organizations will be contributing
    to section 2 (and what questions). After completing this, the database
    will assign new WorkerID#'s and insert it into the users_access table
    for use. The 'boss' will then copy down these ID's/password's for his
    managers to complete their portion of the survey.

    I would appreciate feedback for this idea, good or bad. I appreicate
    constructive criticism. I know this is heavy on the database, but I
    wanted to know if PHP was the feasable solution for this sort of web
    survey (can it get the job done, which I think it can).


    -GTF

  • Larry Jaques

    #2
    Re: A PHP/mySQL Web Survey..

    On Fri, 05 Dec 2003 01:24:04 -0000, GTF <GTF@nowhere.co m> brought
    forth from the murky depths:
    [color=blue]
    >PHP Web Survey Idea..
    >
    >I have been given an opportunity to create a web based survey. This is a
    >fairly lengthy survey of 60 pages on paper (various multiple choice and
    >free form).[/color]

    That is one damned long survey, sir. I sincerely hope this is a
    captive audience.

    [color=blue]
    >These are the Requirements:
    >
    >-Provide a web interface to a database
    >-Database stores the data (duh), but the capacity to extract the data
    >into an Excel sheet.[/color]

    I did this with a complete Federal Form 1040 online for a client
    a couple years ago. He was too cheap to go with a database so we
    just gathered the info and spit it out in email to him. He did the
    extraction to his tax program. There were over 380 potential variables
    but we got them on 8 pages. Most were captured 4-6 on a line.

    [color=blue]
    >The survey is being done by 20-30 different organizations.[/color]

    How did you get them to agree on the questions? Or is that why
    it's a 60-pager? ;)

    [color=blue]
    >My immediate thoughts were to use PHP and mySQL for this project. These
    >are my ideas for database setup (using mysql):[/color]

    Should be doable. Both programs are suitable.

    [color=blue]
    >Here are my tables:[/color]

    I'll let the more experienced programmers field those questions
    since nearly all of my experience is working with existing DBs.
    (Sorry for the database pun there, G.)

    [color=blue]
    >I would appreciate feedback for this idea, good or bad. I appreicate
    >constructive criticism. I know this is heavy on the database, but I
    >wanted to know if PHP was the feasable solution for this sort of web
    >survey (can it get the job done, which I think it can).[/color]

    Good idea, PHP is great for this, but I question the length
    of the survey. I thought the 8 pages of queries were too long
    but we broke them up into 4 sections. An hour online is an
    eternity even for experienced computer users, but that's about
    how long the 1040 forms took to fill in.

    "SIXTY pages?" he said, whilst wiping his brow and sighing deeply.


    -----------------------------------------------------------
    --This post conscientiously crafted from 100% Recycled Pixels--
    http://diversify.com Websites: PHP Programming, MySQL databases
    =============== =============== =============== =============== =====

    Comment

    Working...