I have a form our marketing department uses to record accounts which they have given away to prospective customers. This information is recorded in a mysql table. The number of "giveaways" to be recorded is generated by the user entering the number of entries they wish to make by an earlier variable - $numtest.
for ($i=0;$i<$numtest;$i++) {
print"<tr>";
print"<td><input type='text' name='username[]' class='charts'></td>";
print"<td><input type='text' name='givento[]' class='charts'></td>";
print"<td><input type='text' name='givenby[]' class='charts'></td>";
}
print"</tr>";
Once submitted, I then need to populate the table with the data for each record.
If I was only inserting only one of the variables, say username, I have no problem.
I would just use
foreach($username as $pin) {
$qry=blahblahblah
}
But how do I put each element of each record into the table.