获取SQL数组作为复选框

I have a form that saves each item to my database. I have checkboxes for the different options such as category and sub category which saves as an array. All of that works perfectly when saving into the database. But I am having a hard time figuring out how to get the checkboxes ticked if the category is wrong. I have tried numerous things and have finally just given up. I am hoping someone can point me in the right direction.

On my edit page I have two blocks of code: one that GETs the info from the database and one that POSTs the updated information.

Here's the GET code:

<?php
if (isset($_GET['sid'])) {
    $targetID = $_GET['sid'];
    $sql = mysql_query("SELECT * FROM scents WHERE id='$targetID' LIMIT 1");
    $scentCount = mysql_num_rows($sql); // count the output amount
    if ($scentCount > 0) {
        while($row = mysql_fetch_array($sql)){ 

             $scent_name = stripslashes($row["scent_name"]);
             $can_compat = $row["can_compat"];
             $gel_compat = $row["gel_compat"];
             $scent_description = stripslashes($row["scent_description"]);
             $sug_color = stripslashes($row['sug_color']);
             $soap_compat = $row["soap_compat"];
             $phthalate_free = $row["phthalate_free"];
             $category = stripslashes($row["category"]);
             $subcategory = stripslashes($row["subcategory"]);

        }
    } else {
        $msg_to_user = "Sorry, That scent doesn't exist.";
    }
}

?>

Here's the POST code:

(I do not have category and sub category checkoxes being updated because I can't get them to work, so will add that when I can figure it out)

<?php 
if (isset($_POST['scent_name'])) {
    $sid = mysql_real_escape_string($_POST['thisID']);
    $allowed = '<div><p><span><strong><em><br><a><img><h1><h2><h3><h4><ul><ol><li><blockquote>';
    $scent_name = mysql_real_escape_string($_POST['scent_name']);
    $scent_description = mysql_real_escape_string(strip_tags($_POST['scent_description'], $allowed));
    $can_compat = mysql_real_escape_string($_POST['can_compat']);
    $gel_compat = mysql_real_escape_string($_POST['gel_compat']);
    $soap_compat = mysql_real_escape_string($_POST['soap_compat']);
    $phthalate_free = mysql_real_escape_string($_POST['phthalate_free']);
    $sug_color = mysql_real_escape_string($_POST['sug_color']);

if(isset($_POST['category'])) {
    $category = implode(", ", $_POST['category']);   
        } else {
            $category = "";
        }

if(isset($_POST['subcategory'])) {
    $subcategory = implode(", ", $_POST['subcategory']);   
        } else {
            $subcategory = "";
        }

    $sql = mysql_query("UPDATE `scents` SET `scent_name`='$scent_name', `scent_description`='$scent_description', `can_compat`='$can_compat', `gel_compat`='$gel_compat', `soap_compat`='$soap_compat', `phthalate_free`='$phthalate_free', `sug_color`='$sug_color' WHERE `id`='$sid'");

    header("location: admin_scent_manage.php"); 
    exit();
}
?>

Here's the some of the form code:

<tr>
    <td align="right">Holidays: <label for="category">
        <input type="checkbox" id="category[]" name="category[]" value="Holiday" >
        </label>
    </td>
    <td align="left">
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="Christmas" > Christmas<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="Valentines" > Valentines Day<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="Thanksgiving" > Thanksgiving<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="StPatrick\'s" > St. Patrick's Day<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="Easter" > Easter<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="4th" > Fourth of July<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="Wedding" > Wedding<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="Mother\'s Day" > Mother's Day<br />
        <input type="checkbox" id="subcategory[]" name="subcategory[]" value="Father\'s Day" > Father's Day
     </td>
   </tr>

I need to figure out how to make sure the correct checkboxes are checked if a certain category or subcategory is in the array for the particular item, and so that if I need to uncheck them or check other boxes it is updated accordingly. Everything else updates perfectly fine. I just can't figure out the checkboxes part. I have tried everything I could find and nothing has worked so I just have them not updating right now.