I’ve been taking in an array of textboxes, all of which have the same name. For example, one of them is like this:
<input type=text name="serial[]">
<input type=text name="serial[]">
<input type=text name="serial[]">
<input type=text name="serial[]">
Then I’m taking them in like:
$altSerial = $_POST[‘serial’];
But I keep getting a variable not defined error.
Any tips?
There is a problem with the form. The HTML you posted is correct (or there aren’t any obvious problems with it) – and you should get an array in
$_POST['serial']Post them as well, maybe you haven’t set
method="POST", or a similar issue.