Printing errors during save custom post type

Either add a die after that print_r() or (better) use error_log() instead of print_r() and look at your php error logs for the output.

What’s happening is WordPress is reloading content before you get a chance to see the output (in most cases).

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