edits to main.php to establish database connection