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_answers (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#(primarykey), 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