Hello to all,
Is it possible in php to automatically send an email out on someone's birthday?
I mean to say without anyone clicking a button to do so? If so, please let me know.
Your help much appreciated .
Thanks
Hello to all,
Is it possible in php to automatically send an email out on someone's birthday?
I mean to say without anyone clicking a button to do so? If so, please let me know.
Your help much appreciated .
Thanks
You'd have to have all the user's birthdays in a database. Then make a script that checks for all birthdays that are on todays date (using the date function). It would then send said users an email for their birthday.
You could run a cron job everyday to check the database (basically run the script).
█ Neil Hanlon | x10Hosting Support Representative
█ Neil[at]x10hosting.com
█ I'm always happy to help. Just ask a question in Free Hosting
█ Terms of Service IRC
I think one of the big issues including running a "script" is what process is going to run or execute that "script" or a ".php" web page. For example; I wanted to send an email out to all focals who have outstanding requests that are over five days old. If the website is heavily used, I could create a .php or .asp scripting page to check the date difference because I'll know someone will go to that page. But as you pointed out; you don't want to do this as do I. So, since I was dealing with Database Admins on a SQL server, I had to create what is called a "DTS" (Data Transformation Service) package to run that web page or "script" and have the DBA Admin "schedule" the time (ie; every day at midnight) when to run that "package" so the script will executed to do the outstanding date comparison - similar to what you may want to do. You may need to ask for assistance from a "DBA" or some kind of Web/DB administrator...
Last edited by ejweb; 04-10-2009 at 07:52 PM.