query("SELECT * FROM students WHERE id = $student_id")->fetch_assoc(); if (!$student) { header('Location: students.php'); exit; } $page_title = 'View Marks - ' . $student['student_name']; $page_subtitle = 'Student marks history'; $current_user = getCurrentUser(); // Get all marks for student $marks = $conn->query(" SELECT s.subject_name, s.subject_name_pb, m.marks_obtained, s.max_marks, m.exam_year, m.exam_type FROM marks m JOIN subjects s ON m.subject_id = s.id WHERE m.student_id = $student_id ORDER BY m.exam_year DESC, m.exam_type "); include 'includes/header.php'; include 'includes/sidebar.php'; ?>

Class Roll No: Reg No:

Add More Marks Back
num_rows > 0): ?> fetch_assoc()) { $exam_key = $row['exam_year'] . ' - ' . $row['exam_type']; $exam_marks[$exam_key][] = $row; } ?> $subject_marks): ?>

Subject ਵਿਸ਼ਾ Max Marks Marks Obtained Percentage Result
% = 33): ?> PASS FAIL
Total % = 60) echo "First Division"; elseif($overall_percentage >= 45) echo "Second Division"; elseif($overall_percentage >= 33) echo "Third Division"; else echo "Fail"; ?>

No Marks Found

This student doesn't have any marks yet.

Add Marks