473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

set timer on page access

hello everybody,
I'm a new member here, and I'm happy to be with you.
Please I'm a student and I need to finish my project as soon as possible, but I have a problem. Actually, my project is to do online exam system using php and Mysq and I need your help in php. I want to create a timer using php that will start counting the time when the student access the test page until it reach 10 minutes then it will submit the page and insert the data in to the database.
Please, I really need your help as soon as possible, and I will be grateful to you.
Thanks...
May 7 '07 #1
4 2682
hello everybody,
I'm a new member here, and I'm happy to be with you.
Please I'm a student and I need to finish my project as soon as possible, but I have a problem. Actually, my project is to do online exam system using php and Mysq and I need your help in php. I want to create a timer using php that will start counting the time when the student access the test page until it reach 10 minutes then it will submit the page and insert the data in to the database.
Please, I really need your help as soon as possible, and I will be grateful to you.
Thanks...
May 7 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
You have posted in the Articles section. I am moving this question to the PHP forum.

ADMIN
May 7 '07 #3
pbmods
5,821 Expert 4TB
I want to create a timer using php that will start counting the time when the student access the test page until it reach 10 minutes then it will submit the page and insert the data in to the database.
Unfortunately, you can't do this directly with PHP. You can use JavaScript's setTimeout function to do this, or you could use a META tag (search for 'http-equiv=refresh'), though this wouldn't force the form to submit.

Alternatively, you could put each question on a separate page. On the first page, the program would set a session variable (we'll call it 'timeout') equal to the current time plus ten minutes (make sure you check for an existing timeout so Users can't cheat the system!).

When the User tries to load a page, you could then compare the stored timeout value to the current time. If $_SESSION['timeout'] <= time(), then the User's SOL, and he can't continue.
May 7 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
To avoid confusion. These two threads have been merged.

ADMIN
May 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: William Bub | last post by:
Is there an accurate way to create a "stopwatch" good to 1/10 of a second? I'm not sure if I should use the timer control, or some way to access the computer timer. I found the following site...
18
by: Joe | last post by:
Hi, I am trying to alter the refresh rate of an online webpage in a webbrowser control using MFC. However the Timer ID is stored in a local variable and I don't know how to access it. Is there a...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
6
by: Steve Jorgensen | last post by:
I know quite well that this question falls into the category of "why does Access misbehave when I do unexpected things to its objects?", but I thought I'd ask anyway, and see if anyone knows. ...
11
by: Steve Jorgensen | last post by:
I've recently been playing with some UI ideas that require the user of a timer to drive animation. The problem I'm having is that Access routinely stops firing timer events for long periods of...
8
by: Jim Hammond | last post by:
The following code tries to excute a function 10 seconds after Page_Load by using a Timer, but the callback never gets called. private void Page_Load(object sender, System.EventArgs e) { ...
6
by: Antti Laakso | last post by:
Hi i have function like above Public Sub halytystutkinta() Dim ds As New DataSet ds = dl2.HaeHalytys() Dim onkohal As Int16 onkohal = ds.Tables(0).Rows(0).Item("onkohalytys") halid =...
2
by: Shawn B. | last post by:
Greetings, I have a object that gets created and interted into the Application object of my ASP.NET application, that internally contains a Timer that elepses every so often (once a minute by...
10
by: Ryan | last post by:
I'm creating a website that monitors the status of servers using My.Computer.Network.Ping. I'm looking for a way to fire off my Ping() function every second or so. I see a Timer control...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.