Simple php form help, I think (checkboxes)
Hey php gurus!
I need to handle some checkboxs in my form to return colour choices.
I'm using an array to collect the colour information from the checboxes:
<input type="checkbox" name="colours[ ]" value="Red">Red<br />
<input type="checkbox" name="colours[ ]" value="Blue">Blue<br />
<input type="checkbox" name="colours[ ]" value="Green">Green<br />
<input type="checkbox" name="colours[ ]" value="Yellow">Yellow<br />
Then I want the selected choice of colours to be mailed to an email address. All the other information works but when the data is sent through all I get for the colour selection is:
I'm interested in these colours: Array
Here's the php for the $body of the mesage:
$body = "Please contact me regarding the following:\r\n\r\n";
$body .= "Name: ".stripslashes($_POST['name'])."\r\n";
$body .= "Address: ".stripslashes($_POST['address'])."\r\n";
$body .= "Postcode: ".stripslashes($_POST['postcode'])."\r\n";
$body .= "Telephone: ".stripslashes($_POST['telephone'])."\r\n";
$body .= "Email: ".stripslashes($_POST['email'])."\r\n";
$body .= "I'm interested in these colours: ".$_POST['colours']."\r\n";
Humm....... I'm guessing I need a bit more php to acomplish this?
