+ 2

Html-checkbox.

what is the difference if i use Multiple checkboxes with the same name attribute in a form or use different name : /

5th Oct 2017, 1:05 PM
Aya Habeeb
Aya Habeeb - avatar
2 Answers
+ 4
If you use Checkboxes for grouping in one same name attribute, make sure your name attribute is in array type string eg. name="animal[]", eventually the data would be in array type of data when access by Javascript or submits to PHP server. Here is how PHP handles same name attribute checkboxes http://form.guide/php-form/php-form-checkbox.html Here is how Javascript handles same name attribute checkboxes http://www.dyn-web.com/tutorials/forms/checkbox/same-name-group.php
5th Oct 2017, 1:32 PM
CalviŐČ
CalviŐČ - avatar
+ 3
no difference
5th Oct 2017, 1:09 PM
Samudi Virasha
Samudi Virasha - avatar