I am searching for this topic but i am not satisfied with their solutions.
Here is my problem:
I have an array of checkboxes with the same name 'appid'. Now if i will submit this one, how will my script receive them since they are an array.
is it ...
There's only ever going to be one $_POST['app'] because you overwrite it each time your loop (which ever is the bottom one ticked witll show on the other side).
that is when your friend the id comes in. use the same id on all your checkboxes in a group then use document.getElementById['idname'] as an array in js.
for (i=0; i < document.getElementsByName('yourcheckboxnameї]').length; i++){
document.getElementsByName('yourcheckboxnameї]').item(i).checked = true;
}
this will check all of them in the array, but you could do whatever you wanted...ie check to see if they are all checked and if not, break the loop etc.