how to make date reminder in PHP & MYSQL
I'm making a database for labors resident Visa, I want to make a reminder on e开发者_C百科xpiry date, if a visa expire at 1/1/2012, I Want PHP to send me reminder as email, or pop up message
EDITthank you guys, but let's forget about the reminder via email, let's say I created a table (ID,name,issue date,expiry date) (1,joe,11/11/2009,12/11/2011) and all data are displayed in a table.. what I want to do is, I want the color of the table row to turn red in case its expired.
I hope I explained it right..
create a page to check the expiry date and do necessary action. set a cron job to call the page every one hour or a time suitable for you.
Search for cron job and how to setup it in your control panel using your search engine
Run a cron job every day to fetch the list of visas expiring on specific date, and send a mail to all the results.
More info about cron http://www.sitepoint.com/introducing-cron/
Check this url which could be the basis of your script, and easily merged. http://www.devarticles.com/c/a/MySQL/Setup-Your-Personal-Reminder-System-Using-PHP/1/
You need to write the cronjob .. that make an email to you after a specific time You can read more about cronjob from here ...
cronjob
Sandeep and Joby provided your solution. I would like to add this as another suggestion.
Use cron job to schedule a process that will check for visas expiring everyday. Then send an email appropriately.
To send an email easily, you can use PHPMailer library. It has a lot of built-in facility which are ready for use.
精彩评论