I am building a form with dynamic info and need to email that information.
I have built a loop to output the contents of a dynamic form submission.
for($b=1; $b<=$students; $b++)
{
//maninpulate variable
$student_name = "student$b";
$student_name_value = $$student_name;
//Then I can print each students information:
Student $b<P>
$student_name_value<br>
}
This is working fine, the problem I am having is how do I email this email data?
I can't put the loop within the email function.
I could put each student's info into an array like this
$student_information[] = $student_name_value;
But, then how do I put this into the form?
$student_information[0]
$student_information[1]
....continue for the number of students.
mail ("to_email", "subject", "\n
INSERT LOOP OUTPUT HERE
", "From:\n");