hello all!
i need to add a number (months) to a date from a mysql table in the format of YYYY-MM-DD . the problem i am having is if the month goes over a year, incrementing the year.
any suggestions on how i could accomplish this. i tried converting the date with strtotime and adding $contract but that just adds to the end of the string incremementing the minutes (ithink).
// check for contract closing
$query = "SELECT * FROM products_purchased";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
for ($i=0; $i<$num_results; $i++) {
$row = mysql_fetch_array($result);
// need to add contract (months to date purchased
$date_purchased = $row['date_purchased'];
$contract = $row['contract'];
}
thanks