group check box in php and send to email
<p>I am using a sample php conatct form from <a href="http://www.html-form-guide.com/contact-form/php-contact-form-tutorial.html" rel="nofollow">http://www.html-form-guide.com/contact-form/php-contact-form-tutorial.html</a> and I want to use check box in my form , but I am receiving only last checked one in my email. I find out that I should use array for check boxes like:</p>

<pre><code>input type="checkbox" name="chk_group[]" value="value1" /&gt;Value 1&lt;br /&gt;
input type="checkbox" name="chk_group[]" value="value2" /&gt;Value 2&lt;br /&gt;
input type="checkbox" name="chk_group[]" value="value3" /&gt;Value 3&lt;br /&gt;
</code></pre>

<p>and I should use following loop some where in my code:</p>

<pre><code>&lt;?php
if (isset($_POST['chk_group'])) {
    $optionArray = $_POST['chk_group'];
    for ($i=0; $i'&lt;'count($optionArray); $i++) {
        echo $optionArray[$i]."&lt;br /&gt;";
    }
}
?&gt;
</code></pre>

<p>Unfortunately I tried but because the sample contact form which I am using is a little bit strange for me I got errors.</p>

<p>I appreciate if some one can help me to solve this problem.
Thanks</p>
