# AC3 to PHP email → Please Help

**URL:** <https://forum.kirupa.com/t/ac3-to-php-email-please-help/320001>\
**Category:** flash\
**Created:** [March 10, 2011, 10:47pm UTC](https://forum.kirupa.com/t/ac3-to-php-email-please-help/320001 "2011-03-10T22:47:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arove](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@arove](https://forum.kirupa.com/u/arove)\
**Post date:** [March 10, 2011, 10:47pm UTC](https://forum.kirupa.com/t/ac3-to-php-email-please-help/320001/1 "2011-03-10T22:47:03Z")

</div>

HERE IS MY FLASH ACTION SCRIPT TO SEND EMAIL FOR FORM. PLEASE HELP ME TO FIND WHAT I AM DOING WRONG! :sigh:

```auto

send_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);

function fl_MouseClickHandler(event:MouseEvent):void
{

if (theName.text == "" || theEmail.text == "")
{
theFeedback.text = "*Required.";
}
else
{
// Create a variable container
var allVars:URLVariables = new URLVariables();
allVars.box1 = box_1.text;
allVars.box2 = box_2.text;
allVars.box3 = box_3.text;
allVars.box4 = box_4.text;
allVars.box5 = box_5.text;
allVars.name = theName.text;
allVars.email = theEmail.text;
//Send info to url
var mailAddress:URLRequest = new URLRequest("http://www.paintedthetown.com/email.php");
mailAddress.data = allVars;
mailAddress.method = URLRequestMethod.POST;
sendToURL(mailAddress);
theFeedback.text = "Thank you :)";
box_1.text = "";
box_2.text = "";
box_3.text = "";
box_4.text = "";
box_5.text = "";
theName.text = "";
theEmail.text = "";
}
}

```

THIS SEEMS TO BE WORKING BECAUSE I RECEIVE EMAIL BUT IT IS EMPTY (without info)

HERES THE PHP CODE

```php

<?php

//Shows where to send the email.
//Shows what the subject will be in the email.

$sendTo = "craig@paintedthetown.com";
$subject = "Flash Reply";

//Headers to show the information sent.

$headers = " 1: " . $POST[box_1] . 
$headers = " 2: " . $POST[box_2] . 
$headers = " 3: " . $POST[box_3] . 
$headers = " 4: " . $POST[box_4] . 
$headers = " 5: " . $POST[box_5] . 
$headers = " Name: " . $POST[theName] . 
$headers = " Email: " . $POST[theEmail] . 

// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $headers);

?>

```

WHAT AM I DOING WRONG??
