I revisited my code: It was not only a matter of an simple array (the checkboxes), but each array-element ahd several additional text-fields associated (free-text user input) which I had to manage in some way. That's why this code is that unreadable.
Back to your purpose:
Checkboxes are not necessarely individual values: in your example, I would have used one field name for everything in "project" (same for other parts of your form). The values would be sent as an array.
There is no particular trouble for radio-buttons as well. There are even several ways to handle this:
Either you use the same name for the "button value" than for the label:
<input type="radio" name="color" value="green"> Green
<input type="radio" name="color" value="blue"> Blue
etc.
you insert these values into your DB, and you retrieve them later, so things are trivial.
Or you use codes for your items :
<input type="radio" name="color" value="1"> Green
<input type="radio" name="color" value="2"> Blue
etc.
You then have again to ways to manage:
Either your DB "knows" about the codes:
create table colors (
color_id int,
color varchar(20) )
Or it is your code that knows about the colors:
switch ($color_val) {
case 1:
do_green();
break;
case 2:
do_blue();
break;
default:
do_random_color();
}
If your DB handles the codes, it is easy to manage adding color-codes lateron.
If your code handels the color-codes, you have to change your code every time you want to add a color, and you hav to change in every place you use these color-codes.
Hope this helps
JJ Mouris