Forum breadcrumbs – You are here:Asgaros Support ForumSupportDate of Birth
Please or Register to create posts and topics.

Date of Birth

Hello.
Who can help me display my date of birth on my profile?
I have a php code but when I paste it into an empty space it does not display the date. What else needs to be included?

Uploaded files:
  • Screenshot_14.png
  • Screenshot_15.png

I think the code says if $userData->date_of_birth is empty, to print exactly what is printed.

I would assume that $userData->date_of_birth is empty.

Asgaros and newforum.top have reacted to this post.
Asgarosnewforum.top
Quote from Jim on September 21, 2023, 6:00 am

I think the code says if $userData->date_of_birth is empty, to print exactly what is printed.

I would assume that $userData->date_of_birth is empty.

Hello. Thanks for the answer)
Can you help me write the code so that the date is displayed?
P.S. I’m not a code expert)))

@vadimmartin86  I’m not a code expert either.  But obviously, first the date of birth has to get into the database, into the user metadata.  Where is that supposed to happen?

Quote from Jim on September 23, 2023, 12:41 am

@vadimmartin86  I’m not a code expert either.  But obviously, first the date of birth has to get into the database, into the user metadata.  Where is that supposed to happen?

As I understand it, you need to add it to wp user?

Something like that. It needs to be put in the database so that when code later tries to get the WP User data, it comes with it.

So currently you have no mechanism for entering and saving the date of birth?  I assume there is, otherwise how would you think that code could print it on screen?

Quote from Jim on September 24, 2023, 1:22 pm

Something like that. It needs to be put in the database so that when code later tries to get the WP User data, it comes with it.

So currently you have no mechanism for entering and saving the date of birth?  I assume there is, otherwise how would you think that code could print it on screen?

I don’t have this code. I tried to insert it into the table but it doesn’t work. I think this topic can be closed)