My apologies if this question has already been asked before. I've tried searching the forums and googling but no success, as the code given on multiple sites does not work (on my server, anyways).
Basically I have a form with multiple textboxes with the same name, and I'm using the square brackets as suggested by php.net:
<input type="text" name="txtQty">
There's a few of these lines in the HTML. Now in the PHP page that the form is submitted to, I do a die(print_r($_POST)) ; and get:
Array ( [cboCompanyName] => [txtInvoiceDate] => 2006-07-30 [txtInvoiceId] => 1 [txtPONumber] => [cboTerms] => [cboItem] => Array [txtQty] => Array [txtDescription] => Array [txtRate] => Array [cboTaxCode] => Array [txtInvoiceMemo] => ) 1
Looks like everything is great, so I do:
$txtQty = $_POST['txtQty'] ; die($txtQty) ;
And what is printed is not the value of the first textbox, but the letter 'A' (the first character in the string "Array"). Why is PHP not returning an array of values as expected but rather the string "Array"?
Thanks for any help.