Some of my php is rendered only when logged as admin

Some of my php is rendered only when logged as admin

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