WP insert post Redirect after function has executed

Had you tried to output link and verify it is correct?

Also you should call die(); right after redirect.

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