user775171
user775171

Reputation:

reminder system in PHP

I'm going to create a small reminder system in PHP over the weekend. The plan is

  1. Users sign up.
  2. 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.
  3. 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.

Upvotes: 2

Views: 3567

Answers (2)

Jorge Zapata
Jorge Zapata

Reputation: 2336

If you server supports cron jobs use them.

  1. Create your php script which checks and then send email to corresponding user.
  2. 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

Upvotes: 0

Logan Serman
Logan Serman

Reputation: 29870

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.

Upvotes: 4

Related Questions