Hi,
I am trying very hard to make my own recurring invoice script.
I simply have a field where the invoice date is entered.
I just want to check if the date is equal to the date+1year ahead of time.
If so then run the rest of the php to send email attach PDF and etc...
After which i will update the date table with the next current date.
/////////////////////////////// begin query //////////////////////////
$recurrQuery = "SELECT date FROM invoices_recurring WHERE status=1";
$recurrResult = mysql_query($recurrQuery);
while ($recurrRow = mysql_fetch_array($recurrResult)) {
$recurrDate = $recurrRow['date'];
}
if( $recurrDate = $recurrDate(strtotime("+365 day") ) ) {
process invoice script here
} else {
the invoice isnt 1year old
}
Or is there an easier way?
Maybe i could INSERT the invoice creation date with the year already added to it and do a different query?
Any help would be appreciated please :-)
Regards
John