Hi all..
I am Working on an Birthday Reminder Script but i have an Problem in This Script That I Want to Send a email to User That's Birthday is Today. and am Done it Automatically by Scheduled.
For Ex: Today is One User Birthday Then a Email Automatically Send to User regarding Birthday Wishes at The Specified Time.

Please Help me.
I am Poor in English Typing and Hope You all are Understand It.

Thank You.

The best way to do this would be to use a cron job to run a scheduler on your database. Write a query to search for users who have their birthdays on the day the script is being run (today) and then schedule it to run every day.
You can do this by adding your script to the cron if you have your own host or by adding it to crontab if you are running on paid host

Some links
http://www.htmlbasix.com/crontab.shtml
http://www.adminschoice.com/docs/crontab.htm

Mods, can you delete this please? Double posted.

Could u Tell me The Script for IT.

Could u Tell me The Script for IT.

Setting up a cron doesn't require coding. It can be done through a panel (usually). Read the links.

As for the query itself, I can't help you without knowing your database structure.

I Have a Database name: admin_regdata and it's all Field is:
Name, F_Name, DOB, Joining_Date, Login_ID, Password, Address

The above is Database Field.

Read this thread on how to connect to a database : http://www.daniweb.com/forums/thread191031.html

Since you haven't told me how the date is stored (type and format) in your database, I'm going to assume the worst and write the code a VARCHAR field in this format DD/MM/YYYY

Your SQL would look something like this

$sql = "SELECT * 
FROM you_didn't_give_me_a_table_name
WHERE DOB LIKE '" . date('d/m') . '/%";

Sorry, I can't give you a better answer without your schema/structure.

Thanx for Your Many Help.
in my Database the DOB Field Data type is Date (YYYY-MM-DD) and table name is admin_regdata and also all other field is in varchar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.