Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Multiple values in checkbox

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


Sign In or Register to comment.