Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Multiple values in checkbox

Hi,
Just wondering if you can help.
I have a checkbox name 'fruit' that has multiple values e.g. apple, orange, grape
I'm looking to select multiple values and send this to a SQL table. Let's say I select all three fruits.
My problem is every time I send to the SQL table, it always display the number 1 in the field instead of "apple, orange, grape"

This is the PHP code I used:

echo $this->Form->Checkbox('Fruit', 'apple');
echo $this->Form->Checkbox('Fruit', 'orange');
echo $this->Form->Checkbox('Fruit', 'grape');

Any help would be appreciated.

Thank you

Comments

Sign In or Register to comment.