code for getting info from edit page and making changes to DB