<input type=checkbox name=aaa  checked>例如:1为选中,0为不选中可这样
if (id == 1)
  echo "<input type=checkbox name=aaa value=1 checked>";
elseif(id == 0)
  echo "<input type=checkbox name=aaa value=0 >";
end if