When my multiple checkbox form field submits it just says “Array” in the response field
Heres the code:
<input type="checkbox" name="drive[]" value="4wd" />4 Wheel Drive
<input type="checkbox" name="drive[]" value="allwd" />All Wheel Drive
<input type="checkbox" name="drive[]" value="rearwd" />Rear Wheel Drive
<input type="checkbox" name="drive[]" value="frontwd" />Front Wheel Drive
And the PHP code is:
$drive=$_POST['drive'];
$drivestring=implode(",",$_POST['drive']);
And then some other PHP code is in there that already works to make the text file, I just need the $drivestring to make a list of the checked values separated by commas.
That should be fine – you’ll need to put a closing bracket on the end of
$drivestring=implode(",",$_POST['drive'];but I figure that’s just a typo.Are you sure you’re outputting
$drivestringand not$drive?