the jquery :
$("#btnSaveForm").click(function(){
...
$.post('../optional/setup/processItemcn.php', $("#FormTemplate").serialize(), function(data) {
alert(data);
});
...
});
the php with form :
<form id="FormTemplate" class="FormTemplate">
<input type="text" name="kode_item[]" value="1" />
<input type="text" name="kode_item[]" value="2" />
<input type="text" name="kode_item[]" value="3" />
.
.
<input type="text" name="kode_item[]" value="197" />
</form>
the php on serverside :
$ID = $_POST["kode_item"];
$count = count($ID);
echo "$count";
I’ am trying to send all array data from the form to the serverside using jquery post and serialize.
I have total items array of kode_item = 197 items, but after sending it to serverside and then I check and echo it from server side the result of $count = 167 items. that’s why I cannot update data that related to kode_item > 167 because it will not processed on serverside. anyone have any ideas ?
The solution is come up from my webhosting technician.
The array data that send from form to the serverside is getting too long, then.. suhosin limiting the array data that will be sended.
This way work for me. Adding this two line to php.ini: