Home arrow MySQL arrow Page 3 - Setup Your Personal Reminder System Using PHP
MYSQL

Setup Your Personal Reminder System Using PHP


Here is an article that I can personally relate to. How many times have you forgotten to do something that was truly important? Read how one can use PHP to help you send reminders to yourself to prevent this from happening again.

Author Info:
By: Mayank Gandhi
Rating: 4 stars4 stars4 stars4 stars4 stars / 150
August 05, 2003
TABLE OF CONTENTS:
  1. · Setup Your Personal Reminder System Using PHP
  2. · Article
  3. · Final Destination

print this article
SEARCH DEVARTICLES

Setup Your Personal Reminder System Using PHP - Final Destination
(Page 3 of 3 )

Now that we have built all 3 the scripts required for the Reminder System, I am sure that you would be thinking one question; how will these scripts actually send us reminder mails?

Well, good question, up till here it was pretty much standard PHP coding, but how in the world will the script remind us when the event arrives? Well for that we use the services of CRON Jobs (*nix) or Scheduled Events (Windows). In case you have one of the popular servers which employ Cpanel, CpanelX, Plesk, etc then you will find user-friendly tools within their interface to setup Cron Jobs.

If you have the access to setup CRON Jobs or Scheduler Events then you can easily setup an event that would run once in a day preferably at midnight using the following command:

php /ABSOULTE/PATH/TO/reminder_send.php

The above command will execute reminder_send.php using the command line.

Note: /ABSOLUTE/PATH/TO corresponds to the absolute path to the directory on your server where you would store your reminder-system files. 

E.g. /home/devarticles/public_html/reminders/

In case you do not have access to any of the scheduling utilities, then in that case there is another alternative. You can embed the inclusion of reminder_send.php in any of your other working PHP scripts but with one prerequisite, it should be at least that popular that it executes at least once in day. Otherwise whenever the script will be executed it will send out all old reminder events too which might not be of use if the trigger date has already been passed.

Either way here is how you can use this alternate option, add the following code in any of your .php files before starting its output,

include("relative/path/to/reminder_send.php");

Note: relative/path/to corresponds to the relative path to the directory where you would store your reminder-system files. E.g. ../reminders/

As our script reminder_send.php doesn’t produce any output therefore it won’t change the working or the output of your parent script which you use to include it.

Tip: For a tutorial on how to setup Cron jobs via Shell, visit: 


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
MYSQL ARTICLES

- MySQL and BLOBs
- Two Lessons in ASP and MySQL
- Lord Of The Strings Part 2
- Lord Of The Strings Part 1
- Importing Data into MySQL with Navicat
- Building a Sustainable Web Site
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- PhpED 3.2 – More Features Than You Can Poke ...
- Creating An Online Photo Album with PHP and ...
- Creating An Online Photo Album with PHP and ...
- Security and Sessions in PHP
- Setup Your Personal Reminder System Using PHP
- Create a IP-Country Database Using PERL and ...
- Developing a Dynamic Document Search in PHP ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials