html - PHP Mail Form - Checkbox Array -


so i've looked around @ several older questions here on stack overflow , none of them seem give me right output figured should ask own question.

this basic answer, not versed in php. trying send array of checkboxes via e-mail no success far. below small sample have far in form:

html

<input type="checkbox" name="colorstones[white]" value="white" />white <input type="checkbox" name="colorstones[pink]" value="pink" />pink <input type="checkbox" name="colorstones[yellow]" value="yellow" />yellow <input type="checkbox" name="colorstones[light brown/cognac]" value="light brown/cognac" />light brown/cognac 

php

$finish_colors = implode(', ', $_post['colorstones']); $body = $colorstones;  $subject = 'scio test form submission'; $headers = 'from: example@example.com' . "\r\n" . 'reply-to: example@example.com'; $to = 'example@example.com';  mail ($to, $subject, $body, $headers); 

the e-mail sends fine, , of other text/radio fields have send fine, seems checkboxes give me issue. output of when assigning $colorstones $body, returns nothing in message body.

joey

$colorstones = implode(', ', $_post['colorstones']); $body = $colorstones;  $subject = 'scio test form submission'; $headers = 'from: example@example.com' . "\r\n" . 'reply-to: example@example.com'; $to = 'example@example.com';  mail ($to, $subject, $body, $headers); 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -