#!/usr/bin/perl
### Script8.cgi
#### Include the perl module CGI.pm
use CGI qw( :standard);
#print( header() );
#### Extract values from form using param( ) function
$l_name = param( "l_name" );
$f_name = param( "f_name" );
$course = param( "course" );
$section = param( "section" );
$maxnumber = param( "maxnumber" );
$title = param( "title" );
$author = param( "author" );
$isbn = param( "isbn" );
$edition = param( "edition" );
$req = param("req");
#### setting variables for cookie
print "Content-type:text/html\n\n";
#### making the thank you page
print "
Geno Patterson -- Thank You for Bookform";
print "Thanks!";
print "
";
print "Here is a summary of the information provided:
";
#### title
print "- Last Name:
$l_name.";
print "
- First name:
$f_name.
";
print " - Course:
$course.";
print "
- Section:
$section.
";
print " - Maximum Number of Students:
$maxnumber.
";
print " - Textbook Title:
$title.
";
print " - Textbook Author:
$author.
";
print " - ISBN:
$isbn.
";
print " - Edition:
$edition.
";
print " - Required/Recommended:
$req.
";
print "
";
print "
";
#### Open file for appending
open(OUTF,">>commafile.csv");
print OUTF "$l_name,$f_name,$course,$section,$maxnumber,$title,$author,$isbn,$edition,$req\n";
print OUTF ",,,,,,,,,\n";
close(OUTF);
#### Link to comma delimited file -- commafile.csv
print "
Comma Delimited file";
print "";