mysql - reminder system in PHP
948
I'm going to create a small reminder system in PHP over the weekend. The plan is
- Users sign up.
- Users create reminders and todos using a simple form, inputting details such as reminder name, description and time. This information is stored in a MySQL database.
- Script checks the database for reminders that are due to be sent and sends them to the users email and perhaps other actions.
Whats the best way of approaching the script that checks/sends or can someone suggest another idea? Thanks.
Answer
Solution:
You would run a cronjob on your server that would run every x minutes. Each time it runs it would check the database for reminders at the current time and then e-mail the user who made the reminder.
Answer
Solution:
If you server supports cron jobs use them.
Create a cron job to run that script with a syntax like this one:
php -q /home/serverpath/script/file.php
CPanel does have a section for cronjobs