<input type="text" [b]name="accnum"[/b] placeholder="Accession number" />
The name attribute wants to be "accnum" NOT "accnum" unless some jQuery is requiring it (cant think of why or what but I suspect thats wrong).
Form fields are single values NOT arrays, so do not treat them as so.
Then your collection would be
$accnum = $_POST['accnum'];
Note that the variable $accnum is not an array, this is because accnum in the form is not an array.
An array is a variable that contains multiple values, your form holds a single value.
Your for each loop is redundant as you don't need it, this is because for each is for arrays.
So you would access the $accnum variables value explicitly like so:
echo("Acc Num: " . $accnum);
This rule applies to all of your form variables.
Now, I figure there is some jQuery in there, of which I do not know what plugin you are using.
If in the unlikely event that the way you have coded it and treating the variables as arrays is something to do with that jQuery (in other words, you are doing it like you are because a jQuery plugin told you to) you'll need to look at the jQuery plugins documentation as forms and the results from forms are not arrays, so in that case the jQuery would be doing things that don't follow standards.
Thought I suspect if the jQuery plugin has told you to do it that way, the answer will be that the values are not arrays and you're trying to collect them incorrectly.
Well actually there are exceptions, well sort of.
But anyway, if you are trying to do this kind of thing:
... if thats the case your form doesn't fit that kind of model and your still collecting incorrectly.
You see, that method isn't actually an array in the field but an array of fields. Which is different to what your form is trying to do (which looks like your expecting a field containing an array, which is not correct)
Also remember to cleanse your inputs from the form for security and validation reasons.
Actually, that last comment I made, is that what you are trying to do?
As in, is your form actually a list of "users" with a bunch of in-line fields (one per row) with a submit button at the end of each row?
If so, you could do something like that second link, but you wouldnt need a button next to each row in that context but one submit at the end of the form to process them all.
In that case you would do something like this:
foreach ($_POST['accnum'] as $accnum)
// Do whatever you need to do with each accnum ...
But also you wouldn't nest the other for each' in the first for each. You can pick up the array position in the first for each and use that to reference the others easily (so you can keep track of where you are in the list for each field properly).
BUT I still suspect using the form layout you have, even if this is the case, that my first example is what you need and would suffice.