By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,558 Members | 1,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,558 IT Pros & Developers. It's quick & easy.

A PHP/mySQL Web Survey..

P: n/a
GTF
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

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 05 Dec 2003 01:24:04 -0000, GTF <GT*@nowhere.com> brought
forth from the murky depths:
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).
That is one damned long survey, sir. I sincerely hope this is a
captive audience.

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

The survey is being done by 20-30 different organizations.
How did you get them to agree on the questions? Or is that why
it's a 60-pager? ;)

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

Here are my tables:
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.)

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


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
================================================== ===============
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.