<table class="table1">
<tr>
<td class="title">1:</td>
<td><input type="text" placeholder="Giving" class="selector" name="giving1" autocomplete="off"/></td>
<td><input type="text" placeholder="Getting" class="selector" name="getting1" autocomplete="off"/></td>
</tr>
<tr>
<td class="title">2:</td>
<td><input type="text" placeholder="Giving" class="selector" name="giving2" autocomplete="off"/></td>
<td><input type="text" placeholder="Getting" class="selector" name="getting2" autocomplete="off"/></td>
</tr>
</table>
I also have a button which uses javascript to add new rows to my table, with the exact same fields. When new rows are added, the field names will increment e.g. giving3 for third row, giving4 for fourth row etc. I dont know how many rows will be added though.
Now once the user adds however many rows they need, enters all the data, and clicks submit, I need to send that data to my email. At the moment, all I do in php is
$giving= $_POST['giving1']; $getting= $_POST['getting2'];
Obviously the above will only grab the data from the first row. I cant just produce a load of these post for different rows as I dont know how many rows there are. So how could I fetch all this data in this kind of scenario?
Cheers

New Topic/Question
Reply




MultiQuote




|