All you need to do is store the "end_time" in your database. You can get "now" from the MySQL NOW() expression, or the PHP mktime() expression.
Once you calculate "end_time - now", you have your time remaining! You can then display it as a static "h:m" value, or you can plug the seconds left into a Javascript countdown clock that can run down to 0 without the user refreshing the page.