Posted by Reapes on 07/21/07 16:47
Hi Group,
I have a script to remind me on certain days of things.
The script allows a date of the reminder to be set as well as the number
of days prior to the date to be reminded on via email.
I am new to php so be gentle with my code (lol)
Basically what I need to do is check the reminder date (called date in
my mysql table) against todays date (only the month and day as the year
is not used due to it going to be a year on year event) factoring in the
number of days (reminderdays) prior to the date you want reminded of.
My code for the check is as follows - all the values appear to be
correct but this never evaluates as true:
if (date("m",strtotime($mail[date])) == date("m") &&
date("d",strtotime($mail[date])-$mail[reminderdays]) == date("d"))
Please would some php guru point me in the right direction?
Many Thanks!!
R.
Navigation:
[Reply to this message]
|