I have a script that a check box stays checked until a certain date and then is unchecked until checked again. The problem I am having is I need the year begin on June 1st, and the year end on May 1st. I cam up with
$today_year = date("Y");
$begin_date = date("Y-m-d", mktime(0, 0, 0, 6, 1, $today_year-1));
$end_date = date("Y-m-d", mktime(0, 0, 0, 5, 31, $today_year));
but I found out that if the checkbox is checked on June 1st 2009, it won't be checked until January 1st 2010. Any help is appreciated.