use DBI; $dbh = DBI->connect('DBI:mysql:dataflex') or die "Couldn't connect to database: " . DBI->errstr; $sql = "SELECT * FROM dataflex where attorney = '$INPUT{'attorney'}' and where issue = '$INPUT{'issue'}'"; $sth = $dbh->prepare($sql) or print "preparing: ",$dbh->errstr; $sth->execute or print "executing: ", $dbh->errstr; } $dbh->disconnect;