function preventBack(){window.history.forward();} setTimeout("preventBack()", 0); window.onunload=function(){null}; query("SELECT * FROM exam_tbl WHERE ex_id='$examId' ")->fetch(PDO::FETCH_ASSOC); $selExamTimeLimit = $selExam['ex_time_limit']; $exDisplayLimit = $selExam['ex_questlimit_display']; //pagination...//total records per page$numperpage = 1;
//count the total page number$countsql = $conn->prepare("SELECT COUNT(eqt_id) FROM exam_question_tbl WHERE exam_id='$examId'");//$countsql = $conn->prepare("SELECT * FROM (exam_question_tbl) WHERE exam_id='$examId'");$countsql->execute();$row = $countsql->fetch();$numrecords = $row[0];$numlinks = ceil($numrecords/$numperpage);echo "Number of pages : ".$numlinks;$page = $_GET['start'];if(!$page) $page = 0;
$start = $page * $numperpage;echo "Start is ".$start.'
'; ?>
input type="hidden" name="" id="timeExamLimit" value=""> Remaining Time : -->
"> query("SELECT * FROM exam_question_tbl WHERE exam_id='$examId' LIMIT 1 "); // $selQuest = $conn->query("SELECT * FROM exam_question_tbl WHERE exam_id='$examId' ORDER BY rand() LIMIT 1 "); $selQuest = $conn->query("SELECT * FROM exam_question_tbl WHERE exam_id='$examId' LIMIT $start, $numperpage"); // $selQuest = $conn->query("SELECT * FROM exam_question_tbl WHERE exam_id='$examId' ORDER BY rand() LIMIT $exDisplayLimit "); if($selQuest->rowCount() > 0) { // $i = 1; while ($selQuestRow = $selQuest->fetch(PDO::FETCH_ASSOC)) { ?> .) --> ][correct]" value="" class="form-check-input" type="radio" value="" id="invalidCheck" > ][correct]" value="" class="form-check-input" type="radio" value="" id="invalidCheck" > ][correct]" value="" class="form-check-input" type="radio" value="" id="invalidCheck" > ][correct]" value="" class="form-check-input" type="radio" value="" id="invalidCheck" > ][correct]" value="" class="form-check-input" type="radio" value="" id="invalidCheck" > $numperpage * $start; for($i=0;$i<$numlinks;$i++){ $y = $i+1; echo ''.$y.' '; } ?>td style="padding: 20px;"> Reset No question at this moment
Greetings to everyone committed to this unique discussion thread. Please, can anyone help me, i need to add an Ajax to this pagination buttons for previous, and next buttons. When clicked, it doesn't refresh till it gets to the last id. Is a CBT project...