Multiple checkbox

i have 6 checkbox in my entryform.php. I supposed to check more than 1 checkbox at a time. How to store multiple value in single column of database.

The correct technique is to use a foreign key to another table rather than store multiple values in a single column. This is known as first normal form where each field on each table in the database holds only one value.

That said if these values are always going to be 1 or 0 (checkboxes) you could use a bitfield and in MySQL store the data using the Bit field type. But unless you are comfortable writing queries with bitwise comparison operations I wouldn’t recommend doing this.

I do this by naming checkbox inputs as an array elements:

                            <?php
                            foreach($options as $option){
                            ?>

                            <input type="checkbox" name="option[<? echo $option['id'];?>]" /> <? echo $option['id'];?><br />

                            <?php
                            }
                            ?>

as a result I get array of enabled elements:

[option] => Array ( [1] => on [3] => on

It’s fairly simple to learn. I’d say it’s easily the best method of storing a set of boolean values.