Connect database to page