wp_insert_post with advanced custum fields repeater

After you have inserted the post your $pid variable should contain the ID of the post, which you can use calling update_field()

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