Conditional IF statement not returning true even though echo of $user->province is correct

Try changing this:

if ($user->province == 'Free State') {

to:

if ($user->province === 'Free State') {

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