I want my contact form to have an option to choose recipients by the user. Therefore, I implemented the list of 12 checkboxes - each of them is representing the different recipient of the message.
Checkbox value = email adress. Then in php I used the implode function, as some other person adviced me but I can not make it work properly.
I get this error message: "Warning: implode() [function.implode]: Invalid arguments passed in /mywebsite.com/mail.php on line 112"
Line 112 of the code is: $emails = implode(",",$_REQUEST['group1']);
Ok now the html code:
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
<input class="validate[minCheckbox[1]] checkbox" type="checkbox" name="group1" value="[email protected]">
Now the php code:
$emails = implode(",",$_REQUEST['group1']);
$email_to = $emails;
Guys, any idea what might be wrong here? I will highly appreciate your help. Thanks in advance!