<?php

require '../config/function.php';

$paraResult = checkParamId('clientID');
if(is_numeric($paraResult))
{
    $CID = validate($paraResult);
    $clients = getBycId('clients',$CID);
    if($clients['status']==200){

        $clientDeleteRes = deleteCQuery('clients',$CID);
        if($clientDeleteRes){
            redirect('clients.php','Deleted Successfully');
        }
        else{
            redirect('clients.php','Something went wrong');
        }

    }
    else{
        redirect('clients.php',$clients['message']);
    }

}
else
{
    redirect('clients.php',$paraResult);
}

?>