$dsn = "DBI:mysql:database;localhost"; $dbh = DBI->connect($dsn,'user','password'); $sth = $dbh->prepare("INSERT INTO press_releases (time,date,ticker,header,body) VALUES ('$time','$date','$ticker','$header','$body');");