Cross checked form values with database values.  Used a php function encode into a JSON string.