= htmlspecialchars($student['student_name']) ?>
Roll No: = $student['roll_no'] ?> | Class: = $student['class'] ?> | DOB: = date('d M, Y', strtotime($student['dob'])) ?>
query("SELECT * FROM students WHERE id = $student_id")->fetch_assoc(); if (!$student) die("Student not found"); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $exam_type = $_POST['exam_type']; $exam_year = $_POST['exam_year']; $date_of_issue = $_POST['date_of_issue']; foreach ($_POST['marks'] as $subject_id => $m) { $theory = intval($m['theory']); $practical = intval($m['practical']); $sql = "INSERT INTO marks (student_id, subject_id, marks_obtained, practical_marks, exam_year, exam_type, date_of_issue) VALUES (?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE marks_obtained = ?, practical_marks = ?, date_of_issue = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("iiiiisssis", $student_id, $subject_id, $theory, $practical, $exam_year, $exam_type, $date_of_issue, $theory, $practical, $date_of_issue); $stmt->execute(); } header("Location: marksheet_manager.php?msg=success"); exit; } $class = $student['class']; $subjects = $conn->query("SELECT * FROM subjects WHERE class = '$class'"); include 'includes/header.php'; include 'includes/sidebar.php'; ?>
Roll No: = $student['roll_no'] ?> | Class: = $student['class'] ?> | DOB: = date('d M, Y', strtotime($student['dob'])) ?>