+--------+--------+------------------+-------------------------+ | expid | devid | devlanguage | devtime | +--------+--------+------------------+-------------------------+ | 1 | 1 | PHP | less than 1 year | | 2 | 1 | MySQL | less than 1 year | | 3 | 1 | HTML | more than 5 years | +--------+------+--------------------+-------------------------+
I'll use that as the template: I'll assume that you know how to get the expid and devid in there and I'll just put them in there as numbers. <? $devselect = "<SELECT NAME=\"devtime[]\" SIZE=\"1\"> <OPTION VALUE=\"<1y\">Less than 1 year <OPTION VALUE=\">5y\">More than 5 years etc </SELECT>";?> <FORM><TABLE> <TR> <TH>expid</TH><TH>devid</TH><TH>devlangu</TH><TH>devtime</TH> </TR> <!-- a loop will generate each new row --> <TR> <TD>1</TD><TD>1</TD><TD><?=$LanguageName[$expid]?><INPUT TYPE="Check"<? if ($UserKnows[$expid]) { echo " CHECKED"; }?> VALUE="language[]"></TD><TD><?=$devselect?></TD> </TR> <!-- this will end what the loop outputs --> <TR> <TD>2</TD><TD>1</TD><TD><?=$LanguageName[$expid]?><INPUT TYPE="Check"<? if ($UserKnows[$expid]) { echo " CHECKED"; }?> VALUE="language[]"></TD><TD><?=$devselect?></TD> </TR> etc... <!-- here's the hardcoded extras --> <TD>-</TD><TD>1</TD><TD><INPUT TYPE="Text" NAME="DevSetLang[]" VALUE=""><TD><?=$devselect?></TD> etc.. </TABLE></FORM> Now you can access them by (I think) doing something like this: if (!empty($_POST["language"][0])) // (I think that check boxes give "" if they're not checked) if (!empty($_POST["DevSetLang"][0])) // you might consider making a separate "devselect" variable for the text boxes, which will make it easier to check (the array index will work easier) I hope that that helps. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php