Perl script for forms

AGJOSEPH JOSEPHA at VMS.CSD.MU.EDU
Thu Jan 4 11:45:24 EST 1996


It really depends on the nature of the form(s).  You can use one
script to process more than one form, but if your forms are totally
different, writing different scripts might be easier to process
several completely different forms.  

Be more specific, and I will try to help you.

----------------------------------------------------------------------
Bin Zhang <bzhang at Hawaii.Edu>         4303 Diamond Head Road
Automation Librarian                  Honolulu, HI 96816
Kapiolani Community College           Phone: (808) 734-9254
University of Hawaii                  Fax:   (808) 734-9453
World Wide Web (URL): http://www2.hawaii.edu/~bzhang/
----------------------------------------------------------------------

	Hi Bin,
	I really need your help.  I started to write a perl script, and
	ftp it to my server residing in the math dept which is a couple
	of blocks away from our law school.
	See what I did, and tell me what else should I do the script to
	work with the forms I create.  Be very explicit so that I will 
	understand.
	#!/usr/local/bin/perl
	#
	# Name:
 	# Author: Vinit Carpenter (carpenterv at vms.csd.mu.edu) ( This is the guy
                                   who created this script and sent me a copy)
	# Date:
	# Purpose:
	#
	@INC=("/usr/local/etc/httpd/cgi-bin/");
	require("cgi-lib.pl");
	$mailprog = '/usr/lib/sendmail';
	$recipient = 'muweb at www.mu.edu';
	
	&ReadParse;
	
	print &PrintHeader;
	print "<HTML><HEAD>\n";
	print "<TITLE>Thank you for your message</TITLE>\n";
	print "</HEAD><BODY>\n";
	print "<h1>Thank you for your message\n</h1>";
	print "<P><hr>\n";
	print "<a href=http://www.mu.edu/index.html>Click here</a>
	        to continue\n";
	print "</BODY><HTML>\n";
	
	open (MAIL,  "|mailprog  $recipient")  ||  die  "Can't open 
		$mailprog!\n";
	print MAIL "Subject: MU Message Pad\n\n";
	print MAIL  "The following information was collected:\n\n";
	print MAIL "Name:   ", $in{'name1'},"\n";
	print MAIL "E-mail:      ", $in{'name2'},"\n";
	print MAIL "Subject:     ", $in{'name3'},"\n";
	print MAIL "Comments:  \n";
	print MAIL "\n";
	print MAIl $in{'name4'};
	print MAIl "\n";
	print MAIL
	_______________________________________________________________
	print MAIL "Remote host:    $ENV{'REMOTE HOST'}\n";
	print MAIL "Remot IP address:     $ENV{'REMOTE_Addr'}\n";
	print MAIL
	_______________________________________________________________
	"\n__________________________________________________________\n";
	Close (MAIL);
	
Sorry for sending you such a long message.  Tell me which are to stay the
same, where do I have to input information about me to get the form to 
me or whereever it is supposed to go.
Thanks a lot
Angelina
 
    Angelina G. Joseph
    Marquette University Law Library
    1103 W. Wisconsin Avenue
    P.O. Box 3137
    Milwaukee, WI 53201-3137
    Ph: 414-288-5553
    Internet: josepha at vms.csd.mu.edu
    Fax: 414-288-5914
    http://studsys.mscs.mu.edu/~joseph
 
	


More information about the Web4lib mailing list