I have a HTML form with multiple text inputs and some checkbox inputs.
My question is, how do I post if the checkboxes are checked or not in the PHP's mail function message section?
This is my code:
HTML
<form method="post" action="">
<label for="email"><strong>E-mail</strong></label><br />
<input name="email" onBlur="mail(this)" type="text" value="<?php echo $email;?>"/>
<span class="eroareMail error"><?php echo $emailErr;?></span><br />
<label for="site"><strong>Site</strong></label><br />
<input name="site" onBlur="numeSite(this)" type="text" value="<?php echo $site;?>"/>
<span class="eroareSite error"><?php echo $siteErr;?></span><br />
<h2><strong>Lorem</strong></h2>
<p>
Ipsum<input name="Ipsum" type="checkbox" value="<?php echo $Ipsum;?>"/>
Dolor<input name="Dolor" type="checkbox" value="<?php echo $Dolor;?>"/>
</p>
</form>
PHP
$to = "sample@yahoo.com";
$subject = "subject";
$message = "
EMAIL: $email\r\n
SITE: $site\r\n
Lorem: $lorem, $ipsum\r\n
";
mail($to,$subject,$message);
exit();
I tried this code, and some other similar ideas, but nothing works. Please help!