i try to add checked in my checkbox if value in checkbox is same with value from database :
My database :
Column = skin_type
Value = Normal, Dry, Oily
My Default html checkbox :
<input type="checkbox" name="skin_type[]" value="Normal">Normal
<input type="checkbox" name="skin_type[]" value="Dry">Dry
<input type="checkbox" name="skin_type[]" value="Oily">Oily
<input type="checkbox" name="skin_type[]" value="Combination">Combination
<input type="checkbox" name="skin_type[]" value="Sensitive">Sensitive
so if value is Normal, Dry, Oily checkbox with this value will checked , example like below

Below is my current php script (i try to explode the data first but not sure how to add checked if value is equal with value from database) :
<?php
$query_skin_type = mysql_query("SELECT skin_type FROM `customers` WHERE customers_id='".$_GET['cID']."'");
while($info = mysql_fetch_array($query_skin_type)) {
$skin_type = explode(", ", $info['skin_type']);
foreach ($skin_type as $value) {
$value.'<br>';
}
}
?>