I have this rather large form that I need to grab all the user input from and email it. My problem is there are a mixture of normal feilds and then parts of the form are set up in tables. I'm not sure how to go about naming each of the fields in the table so that then I can format the html email so that all that information will be in a table as well. Since not all the fields are in tables I'm not how to go about grabbing all the data and then seperateing it so that in the email all the data that was in a table in the form is in a table in the email and the rest rest of the data can just be printed out. This is how I'm doing it right now. I currently just grabs the posts and then loops through them as key value pairs. And then just prints them out in a line. This fine for the non-table fields, but for things like the pilot roster i would have to name them pilot_1, birth_date_1, cml_1, atp_1, exc. If I print that out with the code I have now it would be rather hard to read. So I was hoping someone could help me with a way to do this.
Here is the link to what the form looks like.
http://www.tinsgroup.com/forms_and_applications/FBO%20Insurance%20Application_12-13-10.pdf
Here's how currently grabbing and setting up the email message.
foreach( $_POST as $name=>$value){
$emailMsg .= "<b>" . htmlspecialchars(var2Readable($name)) . ': ' . "</b>" . htmlspecialchars(clean4Email($value)) . "<br />";
}