I want to implement a time counter with JavaScript or PHP. I did some looking on Google and tried it, but didn't get the output I need.

Users will enter the time in the textbox provided, then I need to give them a counter from the time they entered.

Example: If I enter `1:27:38` and click on submit, the time should decrease and I should get an alert when it reaches 0.

How can I implement this?