I want to create a table in which it is editable in each of it row. At the same time I want to be able to take all the rows of data and put it in a file.
The problem I am having is when I click the button with id = download, I couldnt get all the data in all rows but only the first row as if I clicked the submit button for the id = firstRow.
Anyone know how can I retrieve all the rows of data in one click of a button? I am just using PHP currently so it would be a great help to solve this using PHP, or HTML for that matter.
<form method="post" action="allRows.php">
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
<th>Gender</th>
<th>Single</th>
<th>Test button</th>
</tr>
<tr>
<form action="oneRow.php" method="post">
<td><input type="text" name="person[0][name]"></td>
<td><input type="text" name="person[0][age]"></td>
<td><input type="text" name="person[0][sex]"></td>
<td><input type="text" name="person[0][spouse]"></td>
<td><input id="firstRow" type="submit" name="test"></td>
</form>
</tr>
<tr>
<form action="oneRow.php" method="post">
<td><input type="text" name="person[1][name]"></td>
<td><input type="text" name="person[1][age]"></td>
<td><input type="text" name="person[1][sex]"></td>
<td><input type="text" name="person[1][spouse]"></td>
<td><input id="secondRow" type="submit" name="test"></td>
</form>
</tr>
</table>
<input id="download" type="submit" name="Download" value="Download">
</form>