kiwi_ 0 Newbie Poster

Hello,
I read here on DW
Click Here

I would like to know how to insert multiple checkbox values into multiple columns with values of "0" for no or "1" for yes. If possible I would like to keep them in an array such as:

    <input type="checkbox" name="animal_selection[]" value="tiger">
 <input type="checkbox" name="animal_selection[]" value="rabbit">
 <input type="checkbox" name="animal_selection[]" value="bear">
 <input type="checkbox" name="animal_selection[]" value="zebra">    

I am new to php and oop programming. I have multiple classes but I need a simple "animal" method to place in my animal class that will help me to allocate each animal to its own database column. Eg. if tiger is selected it needs to go to into animal_tiger as "1" while rabbit, bear, and zebra will go into animal_rabbit as "0", animal_bear as "0", animal_zebra as "0". I hope that makes sense. Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.