WordPress template file if else issue

Try changing the code for the line with the_field("GPS"); to:

$gps = get_field("GPS");
echo ($gps == '') ? '*' : $gps;

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