updated code for myprofile and database.php files