edits to main.php for establishing database connection