Hi,
I have this form:
<tr>
<td><input type="hidden" name="ledlamps" value="LED lamps">LED lamps:</td>
<td><input class="field checkbox" type="checkbox" name="box[]" value="3mm"/><label class="choice">3mm</label></td>
<td><input class="field checkbox" type="checkbox" name="box[]" value="5mm"/><label class="choice">5mm</label></td>
<td><input class="field checkbox" type="checkbox" name="box[]" value="8mm"/><label class="choice">8mm</label></td>
<td><input class="field checkbox" type="checkbox" name="box[]" value="10mm"/><label class="choice">10mm</label></td>
<td><input class="field checkbox" type="checkbox" name="box[]" value="Ovals"/><label class="choice">Ovals</label></td>
<td><input class="field checkbox" type="checkbox" name="box[]" value="Assembly LEDs"/><label class="choice">Assembly LEDs</label></td>
</tr>
and this php code:
$box=$_POST['box'];
$ledlamps = $_POST['ledlamps'];
if ($box != 0) {
echo "$ledlamps: ";
while (list ($key,$val) = @each ($box)) {
$val1 = "$val, ";
echo "$val1";
}
}
If I output with echo it displays in the way I want it:
Led lamps: 3mm, 5mm, 8mm (if i tick the respective checkboxes)
But I want to store this in a mysql table field. How do I do that?
Thanks for your help!