Hello everyone,
I'm attempting to make a email contact form for my website but I keep getting an error that reads "Warning: Invalid argument supplied for foreach() in /nfs/[......]/contact_fa.php on line 15."
That points to this line right here:
foreach($_POST['check[]'] as $value) {
$check_boxes .= $value." ";
}
This is supposed to post the proper value from this checkbox input in the form:
<input name="check[]" type="checkbox" id="tos" value="Agreed." />
I'm trying to have the value "Agreed" entered into the email via the line:
$body_message .= 'Agree to TOS: '.$check_boxes;
Can anyone help me understand why I'm getting this error?
Many thanks in advance!!