Added edit page and connected to database