<?php
include('../include/connection.php');

$uid = $_GET['uid'];
$status = $_GET['status'];

if (isset($uid) && isset($status)) {
    $status = intval($status); // Convert status to integer
  
    $sql = "UPDATE `users` SET `blocking_status` = '$status' WHERE `user_id` = '$uid'";
 
    $result = mysqli_query($link, $sql);

    if ($result) {
        echo "Blocking status updated successfully";
    } else {
        echo "Error updating blocking status: " . mysqli_error($link);
    }
}
?>6
