I want to submit a form that have many checkboxes with different values, using firebug I am sure that the checkboxes values are send to the server, but when I print_r the values of the post variable, only the last value is printed and igoring the other values.
<input type="checkbox" name="fruits" value="apple" />
<input type="checkbox" name="fruits" value="orange" />
<input type="checkbox" name="fruits" value="banana" />
and in the server when I print the request parameters
$formData = $this->getRequest()->getPost();
print_r($formData);
Only the last option is printed even I choose all of them and firebug shows them all!
I solve it by making [] in the name of the checkboxex