There are several ways to do this.
One way is to just calculate the starting date and subsequent due dates all in PHP (or JSP or ASP) code and then use code to check whether the next payment in line (coming from a DB table) is before, on, or after the due date. That's really not hard to do once you figure out the algorithm (logic) of it.
Another way is to create a separate table that has every possible date in it for the next few years. Dirt simple table:
CREATE TABLE allDates (
theDate date PRIMARY KEY
You can use MySQL to fill the table, but it's probably easier to just write a dirt simple PHP page to fill it in.
Then, to pick up all the due dates you can write a query that joins that table to your payments table. Say the payment is due on the 13th of the month. So you just do (example onlyl)
SELECT theDate FROM allDates
WHERE DAY(theDate) = 13
AND theDate BETWEEN '2013-1-13' AND '2016-12-13'
ORDER BY theDate
And there are many variations on these two themes.