I’m trying to pass through POST an array of checkboxes but this time it’s not working (i’ve done the same things other times and everything was ok)
In a foreach loop i have this code to create the checkboxes:
$out .= "<td><input type='checkbox' value='$ordiniRiga->idRiga' name=\"etichetteArray[]\" id='mioId' ></td>";
But if i var_dump the $_POST (after checking all the checkboxes) i find that the array is NULL!(all the values ar numbers)
array(10) {
["idRiga1"]=>
string(2) "30"
["idRiga2"]=>
string(2) "31"
["etichetteArray"]=>
NULL
["idRiga3"]=>
string(2) "32"
["idRiga4"]=>
string(2) "33"
["idRiga5"]=>
string(2) "34"
["numRighe"]=>
string(1) "5"
["idOfferta"]=>
string(2) "32"
["idOrdine"]=>
string(2) "12"
["submitEtichette"]=>
string(16) "Stampa etichette"
}
Any idea of why this is happening?I’m using PHP 5.3 and Zend Server.
EDIT – The form it’s really complex, i’ve created this fiddle http://jsfiddle.net/tVwLS/1/ so that you can see it.
EDIT – i0ve tried out the code on a LAMP and it works ok. Does anyone know if there is some kind of configuration that allows posting arrays?
The problem was only with my home installation of zend_server.