in reply to Re: CGI and DBI, new to me...
in thread CGI and DBI, new to me...

If you set RaiseError => 1 you don't need all those 'or die's since the dbh will die for you on any error. Wrap the whole thing into an eval and then check $@ afterwards.
eval { my $sth=$dbh->prepare( q{ your sql here } ); $sth->execute( ... ); # params in the parens to be inserted as above $dbh->commit; }; if($@) { $dbh->rollback; print STDERR "Bad things happened: $@"; }
The commit line will never get called unless the execute went ok. Your program rolls back the query if the eval died. If you are worried about rollback not working, it should also be wrapped in another eval.