added submit and edit forms and database support