inserts update agent form data into database