Ok, I really am not that good at submitting questions here, so if I don't get all the markup just right, go easy on me. I am building a form that contains rows of data, of which a couple of the fields are inputs, and the rows all contain matching data. That is, each row contains the same fields. This is the html for my form...
echo "<div id='display-wrapper' style='position:absolute;
left:-100000px;'><form method='post'><table id='uploan' class='table-striped table-bordered'><thead><tr>";
$TtlReactHeaderNames = array_keys($TtlReactQuery[1]);
foreach($TtlReactHeaderNames as $TtlReactkey=>$TtlReactvalue) {
echo "<th>" . $TtlReactvalue . "</th>";
}
echo "<th class='green'>Revised BB Value</th><th class='green'>Revised Max Loan Capacity</th></tr></thead><tbody>";
foreach($TtlReactQuery as $TtlReactkey=>$TtlReactvalue) {
echo "<tr>";
echo "<td>" . $TtlReactvalue['Store Name'] . "</td>";
echo "<td>" . $TtlReactvalue['VIN Number'] . "</td>";
echo "<td><input type='text' name='display-name' value='" . $TtlReactvalue['Full Name'] . "' readonly /></td>";
echo "<td>" . $TtlReactvalue['SSN(Last Four)'] . "</td>";
echo "<td>" . $TtlReactvalue['Ecash Vehicle Value'] . "</td>";
echo "<td>" . $TtlReactvalue['Max Capacity'] . "</td>";
echo "<td><input type='text' name='revised-bb-value' /></td>";
echo "<td><input type='text' name='revised-max-loan-capacity' /></td>";
echo "</tr>";
}
echo "</tbody></table><input type='submit' /></form></div>";
...and there are about 200 rows of data in this form. The end user will only be choosing one row, filling the info in the fields that are blank, and submitting it. But as it is right now, it will only submit what is on the last line due to the fact that all the rows input's have the same name. I thought of adding a counter and appending the name attribute with the number so that each field has a unique name, but I end up with a BUNCH of empty fields in the POST array when I submit it, although the data is there too, and I don't know what row they are going to fill out so i don't know what to grab from the POST data. Someone suggested a hidden form using javascript to populate the form but I'm not exactly sure how to go about it. Any help would be so appreciated!!!