<?php
header('Content-Type: application/json; charset=utf-8');
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = new mysqli("localhost","root","","edencamp_eden_exam"); $mysqli->set_charset("utf8mb4");

$id = (int)($_POST['id'] ?? 0);
$student_id = (int)($_POST['student_id'] ?? 0);
if($id<=0 || $student_id<=0){ echo json_encode(['ok'=>false,'error'=>'Bad input']); exit; }

$st = $mysqli->prepare("DELETE FROM student_adjustments WHERE id=? AND student_id=?");
$st->bind_param("ii",$id,$student_id); $st->execute(); $st->close();

echo json_encode(['ok'=>true]);
