WordPress PHP command and ELSE IF problem

It could work like this; but you need to use get_field() instead of the_field(), since the latter displays the field instead of returning a value.
See https://www.advancedcustomfields.com/resources/the_field/ for more information.

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