Re: Timers in php?



fb 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

While you probably could do it in PHP (i.e. set a cookie with the current time and check it when they answer), it might be better done with client-side scripting, i.e. javascript.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages

  • Re: Graphically edit a page?
    ... I realized after posting that PHP is rather beside the point. ... >| using PHP to save the info in my database. ... The onClick function will point to a javascript function to tell the ... If the user is using a text only browser then the page is unusable - ...
    (comp.lang.php)
  • Re: Users uploading pictures
    ... members to be able to upload pictures. ... put in an MySQL database? ... it has nothing to do with Javascript. ... The How would be PHP and JS, ...
    (comp.lang.javascript)
  • Web Developers - Happy Hearts And HDTV! - Lockergnome
    ... Certificate on your MSIIS Web server. ... getting data from a database is only half the problem. ... Zend recently started a series about building rock solid code in PHP. ... which provides bulk database conversion. ...
    (freebsd-questions)
  • Re: Users uploading pictures
    ... The How would be PHP and JS, the What would be saving images, and saving images on the server - whether as individual files or in a MySQL database - has nothing to do with client side Javascript. ... its a PHP/MySQL question and that would be more on how to accomplish it instead of what you are trying to accomplish. ...
    (comp.lang.javascript)
  • Re: Techniques for Vulneability discovery
    ... in mind) so i searched the net for some free database driven software and came ... the first thing i did was grab some info about PHP programming and some MySQL ... I did some more reasearch on different types of web based "input validation" ... PHP and SQL docs, etc.. ...
    (Vuln-Dev)