Getting data from checkboxes in a repeated table into an Email template
Please check this page on live URL:
Kunde_skjema.php
At the buttom of the page there is a repeated table with multimpe checkboxes. I want to use the checked values in an email template.
I have done the following:
Put this code at the top of my form page:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $key => $val) {
if(is_array($_POST[$key])) $_POST[$key] = implode(", ", $_POST[$key]);
}
}
?>
Created an array for the checkboxes:
<input type="checkbox" name="Fasiliteter[]" id="Fasiliteter" value"<?php echo $row_rsFasiliteter['Norsk']; ?>"/>
If I'm checking for 4 options, I get "on, on, on, on" in my Email, not the correct value for the checkbox.
I'm attaching my form page and my Email template page.
Thanks in advice.
Regards
Rune