Hi,
I have some checkboxes in an html form. This form uses php to email me the users response. So in my html I set the checkboxes up in an array like this:
<label><input type="checkbox" name="weekday[]" value="Monday">M</label>
<label><input type="checkbox" name="weekday[]" value="Tuesday">Tu</label>
<label><input type="checkbox" name="weekday[]" value="Wednesday">W</label>
<label><input type="checkbox" name="weekday[]" value="Thursday">Th</label>
<label><input type="checkbox" name="weekday[]" value="Friday">F</label>
<label><input type="checkbox" name="weekday[]" value="Saturday">Sa</label>
<label><input type="checkbox" name="weekday[]" value="Sunday">Su</label>
... pretty straight forward then in my php I only want the checked ones so I have this code:
foreach($_POST['weekday'] as $value) {
$weekday .= "$value\n";
}
it works almost perfectly except when I send it to my email, it comes up with the word Array in front of the values like this ArrayMonday Wednesday Friday Sunday .
Does anyone know how to get rid of this? I've searched everywhere and it seems that no one has been able to solve this problem. If anyone can help I would greatly appreciate it.
Thanks!!
Daniel