script to notify of approaching date / timestamp

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
glennn3
Forum Commoner
Posts: 63
Joined: Sat Sep 20, 2003 8:43 pm

script to notify of approaching date / timestamp

Post by glennn3 »

forgive my terminology - i'm trying to create a simple notify function in an invoice script to let me know when a particular date is approaching. i can time stamp the invoice entry but i want to be notified of its expiration date (of course)...

anybody understand what the heck i'm talking about?

thanks,
glenn
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

Code: Select all

$now_timestamp = mktime();
$warning_seconds = 86400;   //  1 day
$timestamp_expire = $db_expire;  //  timesamp from db?

if(($now_timestamp + $warning_seconds) >= $timestamp_expire){
   //  the timestamp is about to expire
}
hope thats what you're looking for?
glennn3
Forum Commoner
Posts: 63
Joined: Sat Sep 20, 2003 8:43 pm

Post by glennn3 »

that should do it, thanks...
Post Reply