Code in functions.php appearing on front-end and dashboard [closed]

According to your sccrenshot you have added your PHP code without PHP tags. PHP codes should be in inside <?php and ?>.

And if you have used it as PHP Short Tag (<?) make sure that to set short_open_tag=On
in php.ini

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