I have completed a customer record system that uses PHP and MySQL (within Dreamweaver 5.5), however i am having difficulty working out how to establish a warning system from the end of a contract.
1. The customer can have a contract of 1 - 5 years (int)
2. The contract start date and created date is stored in the database (date)
3. The notification needs to be 3 months (or 90 days) before the end of the contract.
4. a final balloon payment is required to be paid to finalise the contract or the customer can extend the contract.
5. an email notification becomes available 90 days b4 the end of contract (finally enabling a click of a link to send an email to discuss extending the contract, from the customers email details stored in the database)
6. once the email is sent there needs to be a flag that will say that the email does not need to be displayed anymore.
Does anyone have any suggestion how to go about doing this or even point me to articles that may help, as i have tried looking in various places (to no avail).
You will get better answers to your PHP & MySql questions in the Application Develpment Forum
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
Ensure you give it a day of 1 as well as a month and year when creating a date, otherwise it will use the current day of the system clock, which if you ran it on the 31st of January, would be 31.
Not every month has 31 days, so it would have lapsed into another month.You should also make your dates with mktime() instead of strtotime.