# Flash Email Form Using PHP problem

**URL:** <https://forum.kirupa.com/t/flash-email-form-using-php-problem/155679>\
**Category:** flash\
**Created:** [July 19, 2005, 3:52pm UTC](https://forum.kirupa.com/t/flash-email-form-using-php-problem/155679 "2005-07-19T15:52:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwphoto](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@bwphoto](https://forum.kirupa.com/u/bwphoto)\
**Post date:** [July 19, 2005, 3:52pm UTC](https://forum.kirupa.com/t/flash-email-form-using-php-problem/155679/1 "2005-07-19T15:52:04Z")

</div>

I am having trouble with a checkbox component named ‘ch1’ within my flash form. Everything but that checkbox seems to be working just fine. Bascially the infomation gets to the PHP file then gets emailed to me. The problem is that when the email gets to me the ‘ch1’ or ‘join’ checkbox always has a yes in it that it was selected when it really has not been. Help would be greatly appreciated.

**Code for button** :  
on (release) {  
if (form.ch1.getvalue() == false) {  
form.ch1 = “no”;  
} else {  
form.ch1 = “yes”;  
}  
form.loadVariables(“email.php”, “POST”);  
}

**Code for email.php:**  
\<?php  
//  
$sendTo = “[bwphoto@111.com](mailto:bwphoto@111.com)”;  
$subject = “Test Form”;  
$name\_field = $\_POST[‘name’];  
$email\_field = $\_POST[‘email’];  
$headers = “From: " . $\_POST[“firstName”] .” “. $\_POST[“lastname”] . “\<” . $\_POST[“email”] .”\>  
";  
$headers .= "Reply-To: " . $\_POST[“email”] . "  
";  
$headers .= “Return-path: " . $\_POST[“email”];  
$message = $\_POST[“message”];  
$join = $\_POST[‘ch1’];  
$body = " Name: $name\_field  
Email: $email\_field  
Join: $join  
Message: $message”;  
mail($sendTo, $subject, $body, $headers);  
?\>
