Using meta boxes as the title of a custom post type

You can use get_post_type to check type:

function post_updated( $post_id ) {
    $post_type = get_post_type($post_id);
    // If this isn't a 'book' post, don't update it.
    if ( "book" != $post_type ) return;

    // the rest of your code...
}

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