fixed up database errors and split php file dbConnection into separate files depending on function