Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to set a timer of a page?

Status
Not open for further replies.
Sep 21, 2004
108
US
I am creating a short online test using PHP. I am having trouble to find a code that sets a timer on how much time a viewer can view and enter information on a PHP page. Basically, I would like to make the page only shows to the users for 30 minutes. Then the online exam form will automatically send to my email box. What is a good way to setup that?

Thank you all so much.
 
PHP is server-side and when the user sees your page, PHP has done all the work already and the connection was lost. You will have to use JavaScript to countdown and then submit the form: JavaScript forum
 
Using OOP you can dynamically (if you have enough ownership on your server) out of a template create the exam form upon registration form filling.
Then on the same script page and after the form creation section add still dynamically a cron-job by grabbing when the form is created and loaded on the server its auto incremented ID.
 
Just forgot
you need the cron to first send then del the form
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top