<?php
require_once 'db_connect.php';
$id = (int)($_POST['id'] ?? 0);
if ($id > 0) {
    $conn->query("UPDATE teachers SET account_status = 'active' WHERE id = $id");
    echo json_encode(['status' => 'success']);
} else {
    echo json_encode(['status' => 'error', 'message' => 'بيانات مفقودة']);
}
?>