Forum Moderators: coopster

Message Too Old, No Replies

Trouble with Checkboxes and PHP mail

         

Glh35

6:00 pm on Sep 29, 2009 (gmt 0)

10+ Year Member



I have a form with checkboxes. I'd like to be able to send multiple responses from the checkboxes to the email portion of the php form. I can't seem to get it to work. I've been using a "spamtrap" php mailer form from Geekministry - but it's not working correctly. Here is the code:

html:

<p><input type="checkbox" name="product[]" value="Murad">Murad</p>
<p><input type="checkbox" name="product[]" value="Proactiv" style="vertical-align:middle">Proactiv</p>

Etc. for 14 different products.

Here's the php form code:

$Indhold .= "How would you describe your pores?: ". $validator->get("Question4") ."\r\n";
$Indhold .= "What brands do you currently use?: ". $validator->get("product") ."\r\n";

$MailSuccess = mail($SendTo,$Subject,$Indhold,$FromString);

Question 4 works just fine - only one selection is possible. But the "product" checkbox returns a blank in the email.

I certainly appreciate if anyone could look at this.

Thanks!

Glen

Glh35

6:19 pm on Sep 29, 2009 (gmt 0)

10+ Year Member



Never mind - I got it working. The syntax is correct - I just forgot to upload the newly revised page to my server!

Dumb!

Thanks anyway -

Glen