To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 594
593  |  595
Subject: 
Re: web surveys
Newsgroups: 
lugnet.off-topic.geek
Date: 
Fri, 8 Oct 1999 17:22:30 GMT
Reply-To: 
jsproat@io.IHATESPAMcom
Viewed: 
224 times
  
Christopher Tracey wrote:
  I have a question about web based survey forms.  I want to design a form for a
local watershed group.  The form will be a  combination of yes/no, fill in the
blank, and choices(ie 1-10, 11-20, etc.).

Is it easy to compile the responses
into a file which can be brought into a database?  What are the basic
steps/methods for this? I done surveys where each response was emailed to me but
the volume expected for this is too much to handle by hand.

First thing first:  Perl.  Anything else is just a script.  ;-)

I'd recommend saving the questionnaire data into a database straight from the
CGI script.  You might want to look into MySQL and the Perl module
Msql-Mysql-modules; having a working knowledge of DBD and DBI would help:

http://www.mysql.com/
http://www.perl.com/CPAN-local/modules/by-module/Mysql/
http://www.perl.com/CPAN-local/modules/by-module/DBD/

Failing that (1), save your questionnaire data to a CSV (comma-separated
values) file (remember to always have your CGI flock the file on reads and
writes!), which can be imported into just about anything.  I personally use
the function quotewords from Text::ParseWords to parse the CSV file.  I
*think* Text::ParseWords is included in the core Perl distribution, but if
not, you can find it here:

http://www.perl.com/CPAN-local/modules/by-module/Text/

Cheers,
- jsproat

1.  Like me -- !@#$% MySQL is free on Linux but costs $$$ for Win32...

--
Jeremy H. Sproat <jsproat@io.com> ~~~ http://www.io.com/~jsproat/
Jeremy: "Hi, My name is Jeremy Sproat, and I'm a Slashdot Lemming."
All:    "Hi, Jeremy."



Message has 3 Replies:
  Re: web surveys
 
Thanks a lot. I'll look into this soon. -Chris (25 years ago, 8-Oct-99, to lugnet.off-topic.geek)
  Re: web surveys
 
(...) It might be noted that the book _Learning Perl_ (at least the Win32 "Gecko Book" (1)) has a sample guestbook app in the chapter on CGI. The guestbook data is saved as a serialized CGI object, but you could easily snarf it later and write it to (...) (25 years ago, 8-Oct-99, to lugnet.off-topic.geek)
  Re: web surveys
 
Jeremy: (...) [...] (...) Hmprf! Don't call my Ada progras "scripts"! But yes. Generally people use Perl for CGI programs. If you get it right the first time, and don't need to use the program again a few months later it is probably also ok for the (...) (25 years ago, 8-Oct-99, to lugnet.off-topic.geek)

Message is in Reply To:
  web surveys
 
Hi all, I have a question about web based survey forms. I want to design a form for a local watershed group. The form will be a combination of yes/no, fill in the blank, and choices(ie 1-10, 11-20, etc.). Is it easy to compile the responses into a (...) (25 years ago, 8-Oct-99, to lugnet.off-topic.geek)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR