Hello dear, I am trying to do a preventive maintenance system, and I want to update a task (edit) to modify the date of the next task.
I tried with a code that I found in the forum which is the following
$ values ["Date"] = date ("Y-m-d", strtotime ($ values ["Date"]. '+ 30 days'));
but then when modifying it as I need it so that the number of days is variable from an element in the same table it does not work,
$ values ["Date"] = date ("Y-m-d", strtotime ($ values ["Date"]. '+'. $ values ["Repeat"]. 'days'));
Repetition has 1, 15, 30, 180, 360 days.
Also add a value called a period that has days, months, and years. but I still do not add it since I am stuck with the days.
if you come up with an idea it will be welcome. From already thank you very much!