Hi,
I am trying to do an email form for the first time. I am using checkboxes for the interests section with several checkboxes named int[] and am able to get the values from them fine if I do:
foreach($_POST['int'] as $value) {
echo $value , "\n";}
If I do that it will display the results.
My prob is that I dont want to display the results, I want to email them. How can I store them in a variable to send? I tried:
$interests = foreach($_POST['int'] as $value) {
echo $value , "\n";}
but it wouldnt let me.
I want to set the variable in another variable called $body_of_email
$body_of_email = "Followup form info: <br><br> Email: $email<br>
Comments: $comments<br>
Interests: $value"; //THE INTEREST BOXES THEY CHECKED
I hope I explained this well enough, thanks for any help.