i'm developing on_line entry test facility in it.
Any student who wants to take this test follows the following steps
1. he/she registered him/her self.
2.secondly he enters his user name & password in a login form,if these entries are valid another form appears ,prompting him to enter his complete information.
3.after submitting data (I've implemented all validation checks on all forms)
4.a page appears with a question following options ,a user can select any one or can skip by simply clicking on next button,so another question appears,all these questions are retrieved from sql server table randomly.Ofcourse it was a difficult job,but thanks to God that we have achieved our goal.The only problem i'm facing now is setting time for a student ,because a student is given 30 minuts to take the test.
for this purpose we used time() of php ,but the results was not satisfactory,as in php
time() returns time in second & calculation was not easy,then we used date("h:i:s");
But the result was "cache limiter" error.Now tell me how to overcome this problem
i'm sending script attached with this mail .

Also tell me if any changes are needed to make in php.ini files.


here is my script!


//generating random questions ids
// seed with microseconds
function make_seed() {
list($usec, $sec) = explode(' ', microtime()*2);
return (float) $sec + ((float) $usec * mt_rand());
//Sir,i need time check here
//retrieveing question from data base
$sql=mssql_query("select question,option1,option2,option3,correct_ans from questions where q_id='$ar[$n]'",$con);

}//end of if
//sir,time must be checked here again(i.e each time when user clicks next(submit) button) so with in specified time user is shown questions
}//end of while
echo("<center><table border=0>");

echo("<form >");

echo("<tr ><td background=q1.png height=150 width=500 >");
echo("<p><center><tr><td ><img src=o1.png ></td></tr>");
echo("<tr><td><input type=radio  name=r1 value=$op1>".$op1);
echo("<tr><td><input type=radio  name=r1 value=$op2>".$op2);
echo("<tr><td><input type=radio  name=r1 value=$op3>".$op3);
echo("</td></tr></table></center><br><input type=image src=next_up.png>");

if(empty($r1)) $count1=$count1+0; else if($r1==$op) $count1=$count1+5; else $count1=$count1-5; $x=$count1; echo("you have got $x Marks<br>"); $op=$op4; ?> <html> <body bgcolor="#f0f4ff"> </body> </html> <a href="p1.html">show results</a>

MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to