echo "<form method='post' action='update_checkboxes.php'>";
$result = mysql_query("select name, value from checkboxes");
while(list($name, $value) = mysql_fetch_row($result)) {
echo "$name: <input type='checkbox' name='$name' value='1'".(($value) ? " checked" : "")."><br />\n";
}
echo "</form>";
that should read in all your checkboxes assuming you store them as 1 or 0, and display them all. i think this is sorta what you need, so just play with it.