1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Countdown timer

Discussion in 'General PHP and MySQL Discussions' started by Kirk, Jul 18, 2014.

  1. Kirk

    Kirk Well-Known Member

    Hi all, So the one feature i'm trying to figure out for the quiz add-on is how would i go about developing a timer for the quiz. would it be done with the database?
    Dadparvar likes this.
  2. Aayush

    Aayush Well-Known Member

    Use PHP Sessions, to keep track of time and jQuery to make the counter. Just update the DB once the users proceeds to the next question.
    You don't want to have the DB updating like every second by 100+ concurrent users.
  3. Kirk

    Kirk Well-Known Member

    Lets say i created a setting where admins can specify what time they want to set on the quiz they're creating in minutes. Is this still being doing with php sessions?
  4. Aayush

    Aayush Well-Known Member

    That should be done in DB, cause that persistant data.

    If you are tracking the time it takes for a user to answer a question, then PHP session should be used and later it should be sent and added in the DB.

Share This Page