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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×