in reply to querying a database using checkbox values

$sth->execute || die "Could not execute SQL statement ... maybe invalid?"; die "Error connecting: '$DBI::errstr'";
doesn't produce much useful information. Put the errstr in the first die...
$sth->execute || die "Could not execute SQL statement ... " . $dbh->errstr;

rdfield