I'm new to php and I wanted to make a contract expiration based on different dates.
I wanted to make a table countdown between different dates that is between start date and expiry date from the user input. The user picks the start date and expiry date.
When the user submits both dates to the database, it will start the countdown timer to years, months and days. Below are the examples.
+------------+---------------------------+------------+
| Start date | Duration | Exp. date |
+----------------------------------------+------------+
| 2016.09.28 | 1 years, 12 months, 4 days| 2018-09-27 |
+------------+---------------------------+------------+
When it reaches the expiry date, it will display expired.
+------------+---------------------------+------------+
| Start date | Duration | Exp. date |
+----------------------------------------+------------+
| 2016-09-28 | Expired | 2018-09-27 |
+------------+---------------------------+------------+
Are there any example coding that gets the user input then starts the countdown, displayed on the table? How can I do this in PHP?