I’m trying to create an email submisison form. I’m getting all of the text and number fields to show up fine in the e-mail I received after submitting the form. However, I have three groups of checkboxes and another single check box that wil not return results in the e-mail.
I used
$field = array();
to display the text/number fields. I tried a few different ways to display the checkbox, but to no avail.
Thank you, that did the trick. I have another question. I want to rearrange the submission e-mail. The way it is right now in the e-mail I receive I have to list all of the $fields before the $body. I want to arrange how the e-mail appears, but I’m not sure how.
I’m assuming it has to do with this line of code, which I copied and pasted from a tutorial.
$body = "We have received the following information:\
\
"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\
",$b,$_REQUEST[$a]); }
The top of the e-mail says “We have received the following information” which is perfect. I’m assuming because the fields array is called first is the reason I have to list all of those before the $body which is called second. Is there a way to split up the field arrays around the $body?