im not sure if i understood 100% what you meant - but i would suggest use an array as ckeckbox names...
print "<FORM ACTION=\"$PHP_SELF\" METHOD=\"post\">";
//open table here
.
$i = 0;
//$input is wherever your data comes from - you also can hardcode the table - i wonder if that would make much sense though
while ($input) {
print "<TR><TD><INPUT TYPE=\"checkbox\" name=\"$module[$i]\" value=\"$input\"> $input </TD></TR>";
$i++;
}
//close table here
print "
<INPUT TYPE=\"hidden\" NAME=\"action\" VALUE=\"submitted\">
<INPUT TYPE=\"submit\" value=\"add to db\">
</FORM>";
to process the form, you just run through the array:
if ($action == "submitted") {
foreach ($module as $key => $value) {
$query = mysql_query("INSERT INTO table (id, name) VALUES ('$key', '$value'");
if (!$query) {
print "error!";
}
}
}
i suppose it is SOMETHING like that what you will need...
the basic idea is, that you automatically access all the selected elements by running through an array which has only values for the selected modules set.
hope that helps... sid