#!/usr/local/bin/perl # +----------------------------------------------+ # | survey.cgi -- A script to convert form | # | data into an email that can be | # | read into an Excel spreadsheet | # | | # | Author : Ryan William Facer | # | Created On : Thursday October 22, 1998 | # | Last Modified By : Ryan William Facer | # | Last Modified On : Thursday October 22, 1998 | # | Completed On : Thursday October 22, 1998 | # | Update Count : 0 | # | E-Mail : cattails@cattails.ca | # +----------------------------------------------+ #$mailprog = 'sendmail'; #open(EMAIL,"|$mailprog -t"); # Open the mail program #print EMAIL "To: rfacer@undergrad.math.uwaterloo.ca\n"; #print EMAIL "Subject: Body Break Treadmill Video\n"; # ******************************* # We include the cgi-lib.cgi file # ******************************* do "cgi-lib.cgi" || die "Content-type: text/plain\n\nError loading cgi-lib\n"; # ************************************************* # Now we call the subroutine in cgi-lib.cgi to read # in the variables from the form and set them up as # 'key'='value' pairs in the array @in # ************************************************* &ReadParse; # ************************************ # We iterate through the @in array and # print everything we see to the file # ************************************ print "Content-type: text/html\n\n"; print "\n"; print "$in{'Snack Bar'}\n"; print "$in{'Multi Fruit Juice'}\n"; print "$in{'Breakfast Shake'}\n"; print "$in{'Deli Meats'}\n"; print "$in{'Dry Pasta and Pasta Sauce'}\n"; print "$in{'Pretzels'}\n"; print "$in{'Muffins'}\n"; print "$in{'Brownies'}\n"; print "$in{'Mayonnaise'}\n"; print "$in{'Cut Fruit And Vegetables'}\n"; print "$in{'High Fiber Breakfast Cereal'}\n"; print "$in{'Frozen Meat Lasagna'}\n"; print "$in{'Frozen Vegetable Lasagna'}\n"; print "$in{'Other Food Products'}\n"; print "$in{'Name'}\n"; print "$in{'Email'}\n"; print "\n"; #close (EMAIL); # ****************************** # Now we load another HTML page # that was specified in the form # ****************************** print "Location: $in{'Goto'}\n\n";