#!/usr/local/bin/perl5.005 use lib '../lib'; use strict; use CGI qw(:standard); my $query = new CGI; #Grab the evaluation responses from the form my $cdsid = $query->param('cdsid'); my $title = $query->param('Title'); my $author = $query->param('Author'); my $book_review = $query->param('book_review'); my $post_review = $query->param('post_review'); my $use_name = $query->param('use_name'); my $sendmail = '/usr/lib/sendmail'; my $recipient = 'mbelang3@ford.com'; my $sender = 'e-Books Feedback '; my $site_name = 'e-Courses'; my $site_url = '../e-course.html'; my $site_name2 = 'e-Books'; my $site_url2 = '../e-books.html'; my $value; my $field; my $email; my $name; my $mail_body = ''; print "Content-type: text/html\n\n"; print <<"eof"; eof foreach $field (sort ($query->param)) { foreach $value ($query->param($field)) { $mail_body .= "$field: $value\n"; } } if (($email = $query->param('07_email')) and ($query->param('07_email') =~ /@/)) { if ($name = $query->param('cdsid')) { $name =~ s/"//g; $sender = "\"$name\" <$email>"; } else { $sender = "$email"; } } open(MAIL, "|$sendmail -oi -t") or die "Can't open pipe to $sendmail: $!\n"; print MAIL "To: $recipient\n"; print MAIL "From: $sender\n"; print MAIL "Subject: e-Books Feedback\n\n"; print MAIL "$mail_body"; close(MAIL) or die "Can't close pipe to $sendmail: $!\n"; print "" ""; Which sends you to the second script:
#!/usr/local/bin/perl5.005
use lib '../lib';
use DBI(0.90);
use strict;
use Database;
use CGI qw(:standard);

Database::->db_info_path("../lib/db.cfg");
my $dbh = new Database;

#Grab the evaluation responses from the form
my $cdsid = param('cdsid');
my $title = param('title');
my $author = param('author');
my $book_review = param('book_review');
my $post_review = param('post_review');
my $use_name = param('use_name');


print "Content-type: text/html\n\n";

#Declare variables for insertion constants
my $plselect = "u"; 
my $updt = "L2e Init";

#Insert the e-Book review and book information into il2e009_bk_review
if ($book_review)
{
my %review = 
	('il2e009_book_title_x' => $title,
	'il2e009_book_author_x' => $author,
	'il2e009_eval_cds_id_c' => $cdsid,
	'il2e009_pl_select_f' => $plselect,
	'il2e009_post_rev_f' => $post_review,
	'il2e009_post_name_f' => $use_name,
	'il2e009_review_x' => $book_review,
	'il2e009_last_updt_c' => $updt
	);
foreach my $key (keys %review)
{
   print "$key = $review{$key}\n";
}
print "Attempting insert....\n";
$dbh->insert_row('il2e009_bk_review',\%review);
}

print $cdsid;

$dbh->disconnect;