TIMER FOR QUIZ FOR MULTIPLE PAGES

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
newbaba
Forum Newbie
Posts: 17
Joined: Thu Jan 26, 2017 10:36 pm
Location: Karachi

TIMER FOR QUIZ FOR MULTIPLE PAGES

Post by newbaba »

Hi, just a little help needed can a php session be created with timer i just want to ask i want a timer that starts from page1 and on the page 2 it starts from the same time value where it closed on page 1
total time 30 minutes
on page 1 time consumed 5 minutes
the timer starts on page 2 at 25minute
and so forth
if the time lapses means it reaches 30 minutes it redirects or closes the page

how can i achieve the above result by using php sessions or java scripts

thanks in advance
User avatar
Celauran
Moderator
Posts: 6425
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: TIMER FOR QUIZ FOR MULTIPLE PAGES

Post by Celauran »

You could set up the timer client side and store it in cookies or local storage. Alternately, you could start it server side, grab it on the client on each page load, and then handle it client side.
Post Reply