Want to make a timer

Discussion in 'PHP' started by egdcltd, Nov 13, 2006.

  1. #1
    I'm trying to make a timer for a game running on a phpBB forum. The timer would display different times for each user, when appropriate. Time left would be stored in the MySQL database, and called and displayed on the screen. Unfortunately, all the timer scripts I've found so far seem to count down to a specified date. I'm really not sure how to go about this. Can anyone help please?
     
    egdcltd, Nov 13, 2006 IP
  2. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #2
    disgust, Nov 13, 2006 IP
  3. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Unfortunately, no. Say the player enters an area, they use something which resets the timer to say, 30 min. The timer then starts counting down to zero. When it reaches zero, something happens (haven't decided what yet, but that's probably the easy part). Each player would have a different timer, and it wouldn't start running until certain conditions are met.
     
    egdcltd, Nov 13, 2006 IP
  4. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #4
    PHP can't do a "live countdown." you'd need to export the time via php then do the countdown via javascript or something.
     
    disgust, Nov 13, 2006 IP
  5. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks. I can do it in ActionScript, might use that instead.
     
    egdcltd, Nov 13, 2006 IP