#!/perl/perl5/bin/perl ################################################################## # Easiest perl program submits a response to the clients browser # # and sends you an e-mail with all the info in the form # # You'll need the path to your cgi-bin from you network admin # # See the readme.txt file for further info. # # Written by Mike Mee # # http://members.tripod.com/mnmee/ # ################################################################## require "perl/perl5/lib/cgi-lib.pl"; ###Next Line is your E-Mail Address ####### ###The file path is the same as .cgi file That's all you need ####### $mailAddress='email@xxx.com'; $file='/path/data.txt'; MAIN: { $ENV{'REQUEST_METHOD'}="POST"; # Read in all the variables set by the form if (&ReadParse(*input)) { &ProcessForm; }else{ } } # The message. format MESSAGE = Person First Name : @* $input{'fname'} Last Name : @* $input{'lname'} E-Mail : @* $input{'email'} Address Info Street: @* $input{'street'} City: @* $input{'city'} State: @* $input{'state'} Zip Code: @* $input{'zip'} Feedback First Visit: @* $input{'visit'} Did you Find What You Needed: @* $input{'find'} Comments: @* $input{'comments'} . #send output message to web browser open (FILE, ">>$file"); select (STDOUT); print FILE "First Name: $input{'fname'} "; print FILE "Last Name: $input{'lname'} \n "; print FILE "email: $input{'email'} \n "; print FILE "Street: $input{'street'} \n "; print FILE "City: $input{'city'} \n "; print FILE "State: $input{'state'} \n "; print FILE "Zip: $input{'zip'} \n "; print FILE "First Visit: $input{'visit'} \n "; print FILE "Found it: $input{'find'} \n "; print FILE "Comments: $input{'comments'} \n "; close (FILE); ####You may need to remove the -t depending on your server##### #open (MAIL,"|$mailprog -t"); # print MAIL "To: $FORM{'cpu'} "; #close (mail); sub ProcessForm { print "Content-type:text/html \n\n"; print ""; print ""; print "
Data Submission

"; print "