Adding profile data to database

To show extra fields in profile, use this hook:

function myplugin_show_profile_extra_fields( $user ) {
    // echo your extra fields here
}
add_action( 'show_user_profile', 'myplugin_show_profile_extra_fields' );
add_action( 'edit_user_profile', 'myplugin_show_profile_extra_fields' );

And to save extra fields use following hook:

function myplugin_save_profile_extra_fields( $user_id ) {
    if ( !current_user_can( 'edit_user', $user_id ) ) {
        return false;
    }

    update_usermeta( $user_id, 'extra_field', $_POST['my_extra_field'] );
}
add_action( 'personal_options_update', 'myplugin_save_profile_extra_fields' );
add_action( 'edit_user_profile_update', 'myplugin_save_profile_extra_fields' );

error code: 523