Jump to content
JJJorgensen

Customized member birthday greeting

Recommended Posts

I want to create a customized birthday greeting for my members once they log in.

Requirements:

If they log in +/- 7 days from their birthday, show custom greeting in a pop up box only once. - so if they log in every day they only see the greeting once...

Show the greeting on their birthday (again or new custom message) if they log in ON their birthday.

If they don't log in on their birthday or the +/- 7 days, show a Sorry we missed you, birthday greeting the next time they log in.

I can handle the logic part of this, i.e. BDate +/- 7, etc. I just don't know how to keep track of the log ins.

I tried searching on the web but I kept getting results specific  to development platforms, like WordPress or Wix. I want to write my own code.

I assume it should be handled with a counter? on the log in. Or do I create a new line in the membership table for this log in?

Can someone point me to some documentation or an example? I don't mind researching it.

 

Share this post


Link to post
Share on other sites

You can use localStorage, you can track logins in a database, or you can use cookies to keep track of when they last came to your site.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...