mysql - reminder system in PHP

948

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.

906

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.

426

Answer

Solution:

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

People are also looking for solutions to the problem: PHP file won't upload

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.