prepare("select * from students where regno =:reg") ; $sql->bindparam(":reg",$regno) ; $sql->execute() ; if($sql->rowcount() > 0) { $row = $sql->FETCH(PDO::FETCH_ASSOC) ; $names = $row['studentname'] ; $gender = $row['gender'] ; $imgs = $row['avatar'] ; } if(isset($_POST['first'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['schsession']); $_SESSION["term"] = 'FIRST TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; $term = $_SESSION["term"] ; //$level = substr($classid, 0, 7); //$level1 = substr($classid, 0, 2); //check pin validity $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 15) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; //if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) { $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (term =:tm and stclass = :cs)") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; $sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultc"] = $resultnoc ; } else $msg[] = 'Sorry, Your Result is not Ready or Make Sure you entered correct Information' ; } if(empty($msg)) header("location: resultsheet/basicsheet.php"); } if(isset($_POST['second'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['schsession']); $_SESSION["term"] = 'SECOND TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; $term = $_SESSION["term"] ; //$level = substr($classid, 0, 7); //$level1 = substr($classid, 0, 2); //check pin validity $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 15) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; //if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) { $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (term =:tm and stclass = :cs)") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; $sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultc"] = $resultnoc ; } else $msg[] = 'Sorry, Your Result is not Ready or Make Sure you entered correct Information' ; } if(empty($msg)) header("location: resultsheet/basicsheet.php"); } if(isset($_POST['third'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['schsession']); $_SESSION["term"] = 'THIRD TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; $term = $_SESSION["term"] ; //$level = substr($classid, 0, 7); //$level1 = substr($classid, 0, 2); //check pin validity $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 15) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; //if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) { $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (term =:tm and stclass = :cs)") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; $sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultc"] = $resultnoc ; } else $msg[] = 'Sorry, Your Result is not Ready or Make Sure you entered correct Information' ; } if(empty($msg)) header("location: resultsheet/basicsheet.php"); } // check annual if(isset($_POST['annual'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['schsession']); $_SESSION["term"] = 'ANNUAL TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; //$term = $_SESSION["term"] ; $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (stclass = :cs )") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; //$sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultcm"] = $resultnoc ; } else $msg[] = 'Sorry Your Result is not ready, check back next week' ; //check pin $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; // $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 15) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; //if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) header("location: resultsheet/pjsheet.php"); } if(isset($_POST['mock'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['schsession']); $_SESSION["term"] = 'MOCK' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; $term = $_SESSION["term"] ; //$level = substr($classid, 0, 7); //$level1 = substr($classid, 0, 2); //check pin validity $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 15) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; //if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) { $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (term =:tm and stclass = :cs)") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; $sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultc"] = $resultnoc ; } else $msg[] = 'Sorry, Your Result is not Ready or Make Sure you entered correct Information' ; } if(empty($msg)) header("location: resultsheet/mock.php"); } ?> Result Portal
Result Dashboard

Instruction

To view results, simply select the academic year of the result you want to view and click the corresponding button to the term you want to view, click Cumulative button to view annual results.
Note: Always make sure that the Reg number and name display under student detail section are yours before printing your result. If not logout and Login with correct data to make sure you do print some one else result.

Student Details

Your Name is:

Your RegNo is:


VIEW AND PRINT RESULT

'; foreach ($msg as $item) { echo "
  • $item
  • "; } echo ''; } ?>

    SELECT ACADEMIC YEAR