connect db to page