Title: Retrieve data from database
Last modified: February 9, 2025

---

# Retrieve data from database

 *  Resolved [wimhuynen](https://wordpress.org/support/users/wimhuynen/)
 * (@wimhuynen)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/retrieve-data-from-database-2/)
 * I’ve this code:
   $first_name = get_user_meta($user_id, ‘first_name’, true);$last_name
   = get_user_meta($user_id, ‘last_name’, true);$lidnummer = get_user_meta($user_id,‘
   lidnummer’, true);It’s not a problem to retrieve the first_name and last_name
   but it’s impossible to retrieve the data from lidnummer. The result is always
   empty.Lidnummer is a custom field with type “Input” and Meta-name “lidnummer”.
 * When I check the table there is a value for lidnummer present. I don’t see what’s
   wrong.
   Do I have to call a custom field different than a standard field? Something
   else?

Viewing 1 replies (of 1 total)

 *  Thread Starter [wimhuynen](https://wordpress.org/support/users/wimhuynen/)
 * (@wimhuynen)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/retrieve-data-from-database-2/#post-18297274)
 * Problem is solved. We did a select before the data was saved in the database.

Viewing 1 replies (of 1 total)

The topic ‘Retrieve data from database’ is closed to new replies.

 * ![](https://ps.w.org/profile-builder/assets/icon-256x256.png?rev=2961144)
 * [User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor](https://wordpress.org/plugins/profile-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profile-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profile-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/profile-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profile-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profile-builder/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [wimhuynen](https://wordpress.org/support/users/wimhuynen/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/retrieve-data-from-database-2/#post-18297274)
 * Status: resolved