Using multiple line variable inside a function?

Could be because you are using the concatenating assignment operator incorrectly:

$note_content. =

should be

$note_content .=

http://php.net/manual/en/language.operators.string.php

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