Hello,
I would like to store certain form values in an array and email them.
This is simplified version of my form senario, so that you can understand what I'm doing.
A user selects the number of passengers and clicks 'next'. The next page displays the appropriate number of fields for the passenger names.
The loop I use to do this is this:
for ($i=1; $i<=$passengers; $i++) {
$fields = "<p><label for='name$i'>Passenger $i:</label>
<input name='pass$i' id='pass$i' type='text' size='20' /><p /> ";
echo $fields;
}
I would now like to email these contents.
I believe that since the number of fields varies, the best way to do this is to use a loop to store these values in an array variable, and then include this array variable with the rest of the contents to be emailed.
The problem is that I have been continuously failing to achieve this.
Can someone help?
thanks in advance