updated some of the index.php and database.php