I have a form wich contains a checkbox like this:
<input type="checkbox" name="assignedDepartments[]" value="1" checked class="inputText"> Diverse <input type="checkbox" name="assignedDepartments[]" value="2" checked class="inputText"> test
After I submitted the form, I noticed that the data were doubled. When I put in my php code:
print_r($_POST['assignedDepartments']);
I got the next result:
Array
(
[0] => 1
[1] => 2
[2] => 1
[3] => 2
)
Can anyoane tell me why this happens?