10-26-2012, 12:41 AM
i need help..i am beginner in php and trying to build a online exam system site.
i have used cookie for login, now i wish that my content page(after login) having a start button and after clicking on that my "test.php" gets loaded and countdown stat..and after a given time page gets automatically logged out and answers stored in database simultaneously.
anyone please help me..
Thanks in advance..
10-26-2012, 05:01 AM
Maybe someone knows a simpler way to do this or you don't think the test takers know how to look at the html of their page or knows someone that does.
10-26-2012, 05:26 AM
thanks sunfighter..ok is that possible to store the time using time() in a variable when user click on "start test" and then just using "if condition" when difference of current time and that variable equal to my duration then go to logged out??
10-26-2012, 03:32 PM
Yes, your method will work, but you will need a trigger to run the second part, getting the new time.
The variables sent to the about functions are the time of the interval in millisecs and the name of the function to execute.
In other words, once started, say by the start button, no further input [trigger] is needed.