You are here: Re: Timers in php? « PHP Programming Language « IT news, forums, messages
Re: Timers in php?

Posted by Jeff North on 01/31/08 09:22

On Thu, 31 Jan 2008 03:15:34 GMT, in comp.lang.php fb <fb@noway.com>
<q3boj.26676$4w.24243@pd7urf2no> wrote:

>| Hello. I was working on a .php page that asks a user a question, then,
>| after the submit the answer (multiple choice) it takes data from a
>| database and makes a new question. Let's say that they have 10
>| questions to answer. I'd like to give them a time limit to answer these
>| 10 questions. I was wondering if it is possible to make a timer in php,
>| that counts down and won't reset every time a new question is pulled
>| from the database (it seems this causes a refresh).
>|
>| If this is possible, could you please point me towards some code
>| snippets? Many thanks
>|
>| fb
The start and finish times need to be set within PHP.
These values must be stored within session variables.
On the web page use AJAX to get the current time every second.
If the user is over the time limit then, on the web page, alert the
user to this fact then, on a click of a button, move to the next
question.

Your ISP might send you a not so nice notice to stop abusing the
system.
-- -------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
-- -------------------------------------------------------------

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация