Skip to content

Get value from 200 questions #2857

Answered by Synchro
JackRustig asked this question in Q&A
Discussion options

You must be logged in to vote

This isn't really a PHPMailer question. There are many ways of doing that, but you could simply put everything in the request into the message like this:

foreach ($_REQUEST as $key => $value) {
    $mail->Body .= "$key = $value\n";
}

Bear in mind that the way that checkboxes work in HTML is that if they are unchecked, they will not be included in the form submission, so you have to infer that they are unchecked by comparing them to a list of expected names.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JackRustig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants