php – copy data from USERNAME to WHITELIST with active record-ThrowExceptions

Exception or error:

its a account activation script. It change table value ACTIVE from 0 to 1 but i need also put USERNAME values in whitelist after account activation

else if(isset($_GET["user"])){
    if(isset($_GET['action']) && $_GET['action'] == 'validate'){
        $individual = $queries->getWhere("users", array("id", "=", $_GET["user"]));
        if($individual[0]->active == 0){


            $whitelist = 

            $queries->update('users', $_GET['user'], array(
                'active' => 1,
                'whitelist' => $whitelist
            ));
            echo '<script data-cfasync="false">window.location.replace(\'/admin/users/?user=' . $_GET['user'] . '\')</script>';
            die();
        } else {
            // already active
            echo '<script data-cfasync="false">window.location.replace(\'/admin/users/?user=' . $_GET['user'] . '\')</script>';
            die();
        }
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *