Looking for a simple way to show a welcome message to first time visitors on my website. What's the best approach?
We look forward to supporting you along the way.” “Congratulations on the new position, and many good wishes for your first day at [company name]. We want you to know that we believe in you and we're behind you in everything you do here.” “A warm welcome from the whole team here at [company].
Using a cookie:
if (empty($_COOKIE['first_time'])) {
show_welcome_message();
setcookie("first_time", 1, time()+157680000); /* expire in 5 years */
}
Of course, if the users clears his cookies, he'll see the message again. If he doesn't accept cookies, he'll see the message all the time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With