Apologies for re posting but in one of my edits I had forgotten to hide a password so I wasn't wanting someone to be able to go through my edits and find it
Basically I've created an application form and in it there is a table for the user to put in their education details (school they went to, exam results etc). I've created it so the user can add as many rows as necessary but when I try to get what they've put in into an email, it just comes out blank. There is no error so I just can't figure out where I've gone wrong, I'm thinking it might be something small but for the life of me can't see what the error is. Any help would be greatly appreciated
Edit:
I have now done a much simpler way to create the table and now I get values from the table in the email but, the values are just from the last row rather than each one. Really close to getting this right, any pointers would be really appreciated
This is the updated html code for the table:
<table class="qualifications" id="qualifications" >
<tr>
<td><b>Date From</b></td>
<td><b>Date To</b></td>
<td><b>Name of School/College/Institute or Professional Body</b></td>
<td><b>Examinations Taken and Results</b></td>
</tr>
<tr>
<td><input type="text" name="date_from" id="date_from" /></td>
<td><input type="text" name="date_to" id="date_to"/></td>
<td><input type="text" name="name" id="school_name" /></td>
<td><input type="text" name="results" id="results"/></td>
</tr>
</table>
<a href="#" title="" class="add-row">Add Row</a>
I now use jQuery for letting the user add rows to the table:
var counter = 1;
jQuery('a.add-row').click(function(event){
event.preventDefault();
counter++;
var newRow = jQuery('<tr><td><input type="text" name="date_from" id="date_from'+
counter + '"/></td><td><input type="text" name="date_to" id="date_to'+
counter + '"/></td><td><input type="text" name="school_name" id="school_name' +
counter + '"/></td><td><input type="text" name="results" id="results' +
counter + '"/></td></tr>');
jQuery('table.qualifications').append(newRow);
});
Once the user has completed the form and hit submit application.php runs and the email body for getting the table values I have done:
Date From: {$_POST['date_from']}
Date To: {$_POST['date_to']}
Name: {$_POST['school_name']}
Results: {$_POST['results']}
Like I said this will send values but only from the last row, what can I do so it send the values from every row of the table?
Thanks in advance for any advice