function studentcurriculum($studentid) { $values['ID #'] = $studentid; $studentdetails = search_student($values); //print_r($studentdetails); $sem = $studentdetails[0]['start_semester']; $year = $studentdetails[0]['start_year']; $major = $studentdetails[0]['major']; $curriculumdetails = $major . "_" . $sem . "_" . $year; return $curriculumdetails; }
<?php include 'includes/session_define.php'; include 'includes/function.php'; $error = ""; if (isset($_POST['submit'])) { $dbc = dbConnect('local'); // print_r($_POST); $values['ID #'] = $_POST['studentid']; //print_r($values); $result = search_student($values); //print_r($result); //print_r($_SESSION['student']); if (sizeof($result) == 1) { $_SESSION['student'] = $result[0]; //$_SESSION['student']['student_id'] = $values ['ID #']; //echo $_SESSION['student']['student_id'] ; redirect_to("student_report.php"); } else { $error = "Student not found"; } //$_SESSION['student']=$result[0]; //echo "iambatman <pre>"; // print_r($_SESSION); /*if($result == 1){ $_SESSION['student']=$_POST; redirect_to("add_student_foundation.php"); } else{ $error = "Student data enter failed"; }*/
$course = $set['required']; $fcourse = $set['foundation']; $majorlist = getMajorsList(); $majorlist = array_column($majorlist, 'major'); for ($i = 0; $i < sizeof($majorlist); $i++) { $list['Option'] = $majorlist[$i]; $student_list = array_merge($student_list, search_student($list)); } $loop2 = sizeof($student_list); //echo "<pre>";print_r($student_list); } else { $set = all_courses($major); $course = $set['required']; $fcourse = $set['foundation']; $list['Option'] = $major; $student_list = search_student($list); $loop2 = sizeof($student_list); //echo "<pre>";print_r($student_list); } $loop1 = sizeof($course); //echo "<pre>";print_r($student_list); //print_r($course); $loop1 = sizeof($course); ?> <div id="page" class="container"> <div id="add_student_wrapper"> <div id="add_student_title"> <h1> Multiple Course Report </h1> <br> </div>
<?php $q = ''; if (isset($_POST['q'])) { $q = trim($_POST['q']); } if ($q == '') { $search = view_student(); } else { $search = search_student($q); } ?> <html> <body> <div class="container"> <div class="row col-lg-12"> <h4> Search Student <div class="pull-right"> <form method="post" class="form-inline"> <div class="input-group"> <input type="text" name="q" value="<?php echo htmlentities($q); ?> " class="form-control input-small" placeholder="Search for student..."> <span class="input-group-btn"> <button class="btn btn-default btn-large" type="submit" name="go">Go</button> </span> </div><!-- /input-group --> </form>