$dsn = "DBI:$db_driver:database=$db_database;host=$db_hostname;port=$db_port"; $dbh = DBI->connect($dsn, $db_user, $db_password) || die "cannot connect: " . $DBI::errstr; $sth = $dbh->prepare(qq` insert into solid_gear (product_name, product_publisher, product_price, product_url, product_picture_name, url1, url2, url3, url4, name1, name2, name3, name4, product_review, date, author_id) values ('$product_name','$product_publisher','$product_price','$product_url','$product_picture_name','$url1','$url2','$url3','$url4','$name1','$name2','$name3','$name4','$product_review','$date','$author_id') `) || die "Cannot prepare: " . $dbh->errstr(); $sth->execute() || die "Cannot execute: " . $sth->errstr(); $sth->finish(); $dbh->disconnect;