Jump to content

how to skip from one question to another


gaya
 Share

Recommended Posts

Hi, Please any1 tell me, how to skip from one question to another. For example if i'm writing the exam in online, and if i've attended the question already and that question is evaluated, the attended question should not be viewed again.I dont know how to do this in if condition. please any1 tell me how to do this.

Link to comment
Share on other sites

You could track the questions that have been answered in a session variable, a data file, or a database. The best method depends on your requirements. Like, a session variable would be good if the test has a time limit and if the user must do everything over again every time he takes the test. A file or database might be better if you need the answers to persist for some arbitrary length of time (hours, days, forever).

  • Like 1
Link to comment
Share on other sites

Thanks to all. But it will be a big process in changing the code. So i've got an idea of doing this with includind some images by checking the condition for flag values. Now for that i was supposed to write the query for joining 2tables with some values and then insert into another table with same values.

$query2="SELECT A.Subject='$Subject' && B.orderno='$orderno' && B.qpid='$qpid' && B.tablename='ShortQues' && A.Qno=B.qno && B.part='$part' FROM ShortQues A, questionpaper B WHERE A.Subject = 'Social_Tamil' && B.subject='Social_Tamil'";             $result2=mysql_query($query2);            echo "$query2";$query3="insert into Paper_valuation_inter values(null,$StudentId,$orderno,$qno,'$Subject','$qpid','$tablename','$part',maxmark,0)";$result3=mysql_query($query3);

The above is my query and i dont knw whether it do wat i need. my table fields are Id,StudentId,orderno,qno,'Subject','qpid','tablename','part',maxmark,flag. ShortQues , questionpaper,Paper_valuation_inter are my 3tables.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...