#!/usr/local/bin/perl require "cgi-lib.pl"; #################### $cgiLoc="http://edweb.sdsu.edu/edfirst/HomeMaker/HomeMaker.cgi"; if ($ENV{'REQUEST_METHOD'} eq 'GET') { #If "get," Give `em the form. print "Content-type: text/html\n\n"; #this is the mime header that tells Perl #the output will be HTML print < Here's what happens when you call the CGI directly

Here's what happens when you call the CGI directly

This is an example of how you could use the "GET" request method.

If you wanted to, you could put the HTML for your form here in the CGI so that something will happen when the user calls the CGI directly. EOH ; } ################################################ ################################################ ################################################ elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { #Get their input from the form. &ReadParse; #Here are the variables: # $in{'firstname'} # $in{'lastname'} # $in{'email'} # $in{'bgColors'} # $in{'TextColors'} # $in{'userMessage'} print "Content-type: text/html\n\n"; print < $in{'firstname'} $in{'lastname'}

$in{'firstname'} $in{'lastname'}

E-Mail: $in{'email'}

EOH ; unless ($in{'userMessage'} eq "") { print "Your message was:
$in{'userMessage'}
\n"; } print " \n "; } ;