<?php
$conn = new mysqli("localhost", "root", "", "rs_lab");
if ($conn->connect_error) {
    die("DB Connection failed");
}

if (isset($_GET['id'])) {
    $id = intval($_GET['id']);

    $sql = "UPDATE institutions SET status='inactive' WHERE id=$id";
    $conn->query($sql);
}

$conn->close();

header("Location: admin_dashboard.php");
exit();
