Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

checkbox group form submission

$
0
0

I'm trying to include a checkbox group in a form submission. The user can check one, two, or all three of the choices. I need only the checked boxes to appear in the e-mail to the admin. I understand I need to do some kind of an array, but don't know how. Here is the checkbox group code:

 

 

           
            <input type="checkbox" name="CheckboxGroup1[]" value="Choice1" id="1" />Select choice 1
            <input type="checkbox" name="CheckboxGroup1[]" value="Choice2" id="2" />Select choice 2
            <input type="checkbox" name="CheckboxGroup1[]" value="Choice3" id="3" />Select choice 3
 
And here is the line in the script:
 
            $mail_body .= "Choices: ".$_REQUEST['CheckboxGroup1'];
 
I will also attach the entire script.
 
Any help? THANKS!

Attached Files


Viewing all articles
Browse latest Browse all 13200

Trending Articles