do_action not working in loop

You are calling do_action before adding it. Move add_action up, before HTML part.

Second, your action function ltc_generate_input_fields' expects$fieldsvalue, however yourdo_action` does not pass this parameter, so change it to

do_action($section_actions, $fields);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)