I have a form that has group of checboxs for a user to select a color. I have named the checboxes the same to be able to loop thru them:
<input type="checkbox" name="products_item_color[]" value="01">Black
<input type="checkbox" name="products_item_color[]" value="02">Blue
etc.
Then in my script I try to loop thru any checked values grab them into a vraiable, and put it into one field of the db ...
$theitemcolor=$HTTP_POST_VARS['products_item_color'];
for ($i=0; $i < count($theitemcolor); $i++) {
$insert_color.=$theitemcolor[$i];
}
It looks like insert_color has no value and I don't know why not. Please help!!!
<input type="checkbox" name="products_item_color[]" value="01">Black
<input type="checkbox" name="products_item_color[]" value="02">Blue
etc.
Then in my script I try to loop thru any checked values grab them into a vraiable, and put it into one field of the db ...
$theitemcolor=$HTTP_POST_VARS['products_item_color'];
for ($i=0; $i < count($theitemcolor); $i++) {
$insert_color.=$theitemcolor[$i];
}
It looks like insert_color has no value and I don't know why not. Please help!!!