Paid Membership Pro displaying a user name in PHP

Following @nmr’s comment, you can try this:

if( is_user_logged_in() ) {
    global $current_user;
    echo 'Hello, ' . esc_html( $current_user->display_name );
}

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