1

so I have this timer in javascript, but after it has hit 0 i want some php code to execute. I don't really know where to start :/. My javascript Timer

var count = 4;
        var counter=setInterval(timer, 1000);

        function timer()
        {
            count = count-1;
            if (count <= 0)
            {
             ...
            }
        }
execute php here if count = 0;
  • Make an AJAX request, or redirect when counter hits 0. – Jonnix Jun 16 '16 at 13:20
  • 1
    Check out my answer for a basic tutorial on how to use jQuery's AJAX function: http://stackoverflow.com/questions/20150130/ajax-and-php-to-enter-multiple-forms-input-to-database/20150474#20150474 – MonkeyZeus Jun 16 '16 at 13:35

0 Answers0