Using a custom field value as current users name [closed]

First of all, you’re testing for a string, as you’re wrapping the_field("my_field") in single quotes. So, you want to remove these quotes. Next, the_field("my_field") outputs a field, it doesn’t return it. You should try get_field instead of the_field.

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