I have a system of fines in which the days of fines must be placed and the date on which this fine starts and finishes, it happens that when the days are placed in a separate field it may happen that the number of days does not match the start and end dates, something like this:
Start date 23/2/17 days of fine 4 end date 29/2/17
I would like the start date to always be the current date in my system, and that the end date will be calculated by adding the days inserted in the days field, taking into account that the days start counting the day after the date of fine that is to say.
If you are fined on 2/23/17 and given 3 days, it would be: 24, 25 and 26, therefore, the deadline would be: 26-2-17.
On the other hand I would like to be able to save both dates in my database, because sometimes the format is different from MySQL
<html>
<head>
</head>
<body>
<form>
<h1>Indique los datos de la multa</h1>
<label>Ingrese fecha de inicio</label>
<input type="text" name="fecha_inicio" value="<?=$fecha_fin=date('d-m-Y');?>">
<br>
<label>Ingrese los días de arresto</label>
<input type="text" name="dias_arresto">
<br>
<label>Ingrese fecha de termino</label>
<input type="text" name="fecha_inicio" value="">
<br>
<input type="submit" value="procesar">
<?php
?>
</form>
</body>
</html>