PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Dec 12, 2017 6:54 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Mar 13, 2017 2:08 am 
Offline
Forum Newbie

Joined: Thu Jan 26, 2017 11:36 pm
Posts: 13
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


Top
 Profile  
 
PostPosted: Mon Mar 13, 2017 6:17 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6402
Location: Montreal, Canada
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.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group