<?php

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



$id      = $_GET['blockid'];
$unblock = updateQuery("update tbl_transaction set Received=Amount where id=$id");

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



    $encodedMessage = urlencode($message);



    $url = "challengereport.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 = "challengereport.php?message={$encodedMessage}";

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