if (scalar@row1 == "6")
{ @entry1 = (@required , @row1);
$digest1 = sha1_hex(@entry1);
$sth = $dbh->prepare($query);
$sth->execute($digest1);
$data1 = $sth->fetchrow_array();
if ($data1 ne $digest1) {
push(@entry1, $digest1);
$sth = $dbh->prepare($insert);
$sth->execute(@entry1);
&create_pdf(@entry1);
$msg->attach(
Type => 'image/gif',
Path => "../pdfs/ir_$digest1.pdf",
Filename => "ir_$digest1.pdf",
Disposition => 'attachment')
} else {$dberror .= "The following row you submitted:
@entry1
already exsits in the database and will note be re-submitted.
"}
};