/    Sign up×
Community /Pin to ProfileBookmark

Email Reminder System

Hello,

I was wondering if anyone knows of any email reminder systems out there which i can add to my site??

I have found one (link below), which in theory does what i want. But it was posted back in 2003 so im pretty sure there will be something more recent done by someone else.

[url]http://www.devarticles.com/c/a/MySQL/Setup-Your-Personal-Reminder-System-Using-PHP/[/url]

Im not asking anybody to write my code for me, i have googled a little but im not coming up with much.

So thats why i thought i’d check with you wonderful people on here.

It’s a feature, to be added into a user’s control panel so they can add friends/familys birthdays and have a email reminder the day before or whenever they choose.

If there is a service or code out there which is ideal, for which somebody knows of and it costs. That is also not a problem.

Thanks

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@HHCOwnerJul 09.2010 — You can use something similar to the following code with a cron job to run every day at whatever time you'd like and it'll send an email to each person who has someones birthday set for a reminder in your MySQL database.

[code=php]
<?

include "connect.php";

$today = date('YFd');
$date = $today + 1;

$sql1 = "SELECT * FROM bdays WHERE date='$date'";
$result1 = mysql_query($sql1);

while ($data1 = mysql_fetch_assoc($result1)) {
$username = "{$data1['username']}";

$sql2 = "SELECT * FROM users WHERE user='$username'";
$result2 = mysql_query($sql2);
$data2 = mysql_fetch_assoc($result2);
$email = "{$data2['email']}";

while ($data3 = mysql_fetch_assoc($result1)) {
$name = "{$data3['name']}";
$to = $email;
$subject = "Birthday Reminder";
$message = "Tomorrow is ".$name."'s birthday!";
mail($to, $subject, $message);
}
}

?>
[/code]


Hope this helps. ?
×

Success!

Help @Spyderman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...