Script? - Sending Every Birthday an personalized Email

Previous post not solve your problem.

Here is a suggestion.
I assume that you want to send birthday message to all member whose birthdate stored in database in time stamp format this time stamp format must be php $date=time(); during registration or posting of birth date.
This script will help you to send the birthday message to all member has the birthday.

$from=mktime(0,0,0,date('m',time()),date('d',time()),date('y',time()));
$to=mktime(23,59,59,date('m',time()),date('d',time()),date('y',time()));

$query=mysql_query("select name from people where birthday > $from and birthday <= $to");

loop {
mail for every person
}


You can run this script through cron jobs so that it will automaticaly execute on a particular time. you can change this code according to you convenience
 
Back
Top