connect the DB to search page and added a query