19 lines
373 B
PHP
19 lines
373 B
PHP
<?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='active' WHERE id=$id";
|
|
$conn->query($sql);
|
|
}
|
|
|
|
$conn->close();
|
|
|
|
// Redirect back to dashboard
|
|
header("Location: admin_dashboard.php");
|
|
exit();
|