Database to main.php