edited database.php to render pages