# Kirupa tutorial Flash/PHP form but add checkbox?

**URL:** https://forum.kirupa.com/t/kirupa-tutorial-flash-php-form-but-add-checkbox/110274
**Category:** Uncategorized
**Created:** [May 13, 2004, 11:36pm UTC](https://forum.kirupa.com/t/kirupa-tutorial-flash-php-form-but-add-checkbox/110274 "2004-05-13T23:36:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![avus](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@avus](https://forum.kirupa.com/u/avus)
#### Post date: [May 13, 2004, 11:36pm UTC](https://forum.kirupa.com/t/kirupa-tutorial-flash-php-form-but-add-checkbox/110274/1 "2004-05-13T23:36:26Z")

</div>

Hello All,  
I have used much of the resources on [kirupa.com](http://kirupa.com) but this is my first post here. basically i am clueless. I have gone through threads, even looked at the components tutorial here, and i’m a lost as ever.

I have set a form exactly like the perfectly simple Flash based Email form using PHP tutorial but have added input fields to 8, (which was successful, i might add. Didn’t I feel like I had somewhat of a clue then). Now i wish to add two check boxes. i have tried to assign variables to the checkbox’s states with this code and now I am not getting the email. Did I depart to much from Kirupa’s tutorial with the simple on release loadVariables and onclip(data)? Is my PHP the problem? Am i assigning variables correctly to the true or false states of the checkboxes?

Thanks I’d really appreciate some help since it’s almost 1:30 AM in sweden right now!

```php
on (release){ 
form = new LoadVars(); 
form.firma = ""; 
form.navn = ""; 
form.stilling = ""; 
form.adresseOne = ""; 
form.adresseTwo = ""; 
form.telefon = ""; 
form.email = ""; 
form.komentar = ""; 
form.jegOnsker = value; 
form.kontaktMig = value; 

myArray = [jegOnsker,kontaktMig]; 
for (var i in myArray) { 
myArray*.setChangeHandler("myHandler"); 
} 
function myHandler (component) { 
value = component._name+" = "+component.getValue(); 
trace(value); 
} 

function submit() { 
form.loadVariables("kontakt.php","POST"); 
} 
} 

```

```php
<? 
// kontakt.php 

$message = " 

--------------------------------- 
$firma, 
$navn, 
$stilling, 
$adresse1, 
$adresse2, 
$telefon, 
($email) 

--------------------------------- 
kommentar: $komentar 

jegOnsker: $jegOnsker 
kontaktMig: $kontaktMig"; 

$sendTo = "mailexample@mail.com"; 
$subject = "website kommentar"; 

$headers = "From: " . $_POST["navn"]; 
$headers .= "<" . $_POST["email"] .">
"; 
$headers .= "Reply-To: " . $_POST["email"]; 

mail($sendTo, $subject, $message, $headers); 

?> 

```
