Tutorial #5: Database driven checkboxes: Look here.