Headers already sent on a frontend post form using wp_redirect before get_header

try this.

 echo 'Please enter a title';

Remove this line & check your output.

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