<?php

require('../lib/dbclass.php');



$id    = $_GET['blockid'];
$block = updateQuery("update tbl_club set status=1 where id=$id");

if ($id) {
    $message = 'Blocked successfully!';



    $encodedMessage = urlencode($message);



    $url = "club_management.php?message={$encodedMessage}";

    // Redirect to the new URL
    echo "<script>window.location.href='{$url}';</script>";
} else {
    $message = 'Something went wrong, please try again.';


    $encodedMessage = urlencode($message);



    $url = "club_management.php?message={$encodedMessage}";

    // Redirect to the new URL
    echo "<script>window.location.href='{$url}';</script>";
}
