Time

Discussion in 'PHP' started by radbelerwerazf, Jun 7, 2009.

  1. #1
    Please help as I do that reset every 10 minutes
     
    radbelerwerazf, Jun 7, 2009 IP
  2. Grit.

    Grit. Well-Known Member

    Messages:
    1,424
    Likes Received:
    22
    Best Answers:
    1
    Trophy Points:
    110
    #2
    The best thing to do, would be to learn javascript, as javascript is commonly used for these time based calculations etc.... if you are dead set on PHP aswell, then learn some AJAX
     
    Grit., Jun 7, 2009 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    Easiest way would be a simple javascript countdown that starts based on the current time remaining that you generate with the php script. This way each time someone reloads a page, the time is set correctly and the javascript takes over displaying the countdown.

    You can integrate something like this: http://www.hashemian.com/tools/javascript-countdown.htm
    into the page.
     
    jestep, Jun 7, 2009 IP