# Leaving Checkboxes Blank on Email Form

**URL:** <https://forum.kirupa.com/t/leaving-checkboxes-blank-on-email-form/189841>\
**Category:** programming\
**Created:** [June 6, 2006, 4:27pm UTC](https://forum.kirupa.com/t/leaving-checkboxes-blank-on-email-form/189841 "2006-06-06T16:27:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![magnumdb](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@magnumdb](https://forum.kirupa.com/u/magnumdb)\
**Post date:** [June 6, 2006, 4:27pm UTC](https://forum.kirupa.com/t/leaving-checkboxes-blank-on-email-form/189841/1 "2006-06-06T16:27:15Z")

</div>

Hello,

I used the code from the following tutorial:

[http://www.kirupa.com/web/php\_contact\_form3.htm](http://www.kirupa.com/web/php_contact_form3.htm)

It works as it is supposed to, but I was wondering if there was a way to have it send an email if NO checkbox is selected? Right now, if I test sending an email without checking a box, I get the error:

> Warning: Invalid argument supplied for foreach() in /home/content/r/e/l/reluctant13/html/sendmail.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at /home/content/r/e/l/reluctant13/html/sendmail.php:10) in /home/content/r/e/l/reluctant13/html/sendmail.php on line 16

Bascially I would be using the checkbox to ask if the emailer wanted a reply.

Instead of having two seperate boxes with “yes” and “no” I wanted just one box, where I would try and reply if it were checked.

Thanks!  
Daniel
