in reply to Trying to update a database but entries not being inserted

You disable AutoCommit and never invoke a commit method. This means when you disconnect, all changes are automatically rolled back. Try calling $dbh->commit(); before $dbh->disconnect();. More info on the interface can be found at DBI.