in reply to Inserting data into MS Access databse.........

and, based on your snippet, you should also be able to remove most of those if statements, and reduce them to
$sql = "INSERT INTO $formfriend VALUES ($formemail,$formpass)";
. Also,
$rs = $dbh->Execute( $sql );
can be renooberated thusly :
$rs = $dbh->Execute( $sql ) or die ("Can't execute SQL statement. Perl + says $!, DBI says ",$DBI::errstr,"\n");
$DBI::errstr will give you a much more descriptive error if something doesn't work in between (I think, please correct if wrong) DBI and your DBD.