带有复选框的php表单

I have the following php code. How can I modify the checkbox to keep the selected value which is a "tick" in my database, and then print it back again?

<?php


if ( isset($_GET['success']) === true && empty($_GET['success'])===true ){
echo'Updated Sucessfuly!';?>

<?php 
    }else{

    if( empty($_POST) === false  &&  empty($errors) === true ){

    $update_data_profile_career = array(
                'Consulting' => $_POST['Consulting'],
                'user_id' => $session_user_id,
                      );
                update_user_profile_career($session_user_id, $update_data_profile_career);

                header('Location: profile_update_career_goal.php?success');                             
                exit();


    }else if ( empty($errors) === false ){
                        echo output_errors($errors);
                        echo'</br></br>';
    }


?>

<input type="checkbox" name="Consulting[]" value="<?php echo $user_data_profile_career['Consulting'];     ?>" />Consulting
<?php echo $user_data_profile_career['Consulting']?' checked':''; ?>

You have to check the value from db and use checked='checked' for checking the checkbox

<input type="checkbox" name="Consulting[]" value="<?php echo $user_data_profile_career['Consulting'];     ?>" 
<?php isset($user_data_profile_career['Consulting']) ? "checked='checked'":'' ?> />Consulting