<?php


//this is the page created to lst all the students that did course reg or withou t course reg

//erros and information printouts
$errors = array();
$info = array();
$info_success = array();



if($_REQUEST['act'] == 'clear_courses' )
{//


  //$course_id = $_REQUEST['cid'];//course id
    $pid = $_REQUEST['pid'];//programme id
    $sid = $_REQUEST['sid'];//school id
    $ses = $_REQUEST['ses'];//session passed
    $sem = $_REQUEST['sem'];//semster passed
    $level = $_REQUEST['level'];//semster passed
    $uid = $_REQUEST['u'];//programme id




// if($sem == '1')
// {
//   $q = "DELETE FROM `students_courses_nce` WHERE  student_id = $uid AND session_id = $ses AND semester = $sem";

// }
// else if ($sem == '2')
// {
//   $q = "DELETE FROM `students_courses_nce` WHERE  student_id = $uid AND session_id = $ses AND semester = $sem";
// }
// else  
// {

  $q = "DELETE FROM `students_courses_nce` WHERE  student_id = $uid AND session_id = $ses";

// }

$r = mysqli_query($dbc,$q);



if($r)
{

  header("Location: gateway.php?act=view_students_list_enter_scores&ses=".$ses."&sem=".$sem."&sid=".$sid."&pid=".$pid."&level=".$level."&is=Successfully Cleared");

}
else
{
  header("Location: gateway.php?act=view_students_list_enter_scores&ses=".$ses."&sem=".$sem."&sid=".$sid."&pid=".$pid."&level=".$level."$error=Not Successful");

}






}// end of clear courses is implemented



?>

