# Flash emailer with PHP

**URL:** <https://forum.kirupa.com/t/flash-emailer-with-php/227546>\
**Category:** flash\
**Created:** [May 31, 2007, 4:55am UTC](https://forum.kirupa.com/t/flash-emailer-with-php/227546 "2007-05-31T04:55:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Money4Shop](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Money4Shop](https://forum.kirupa.com/u/Money4Shop)\
**Post date:** [May 31, 2007, 4:55am UTC](https://forum.kirupa.com/t/flash-emailer-with-php/227546/1 "2007-05-31T04:55:36Z")

</div>

I’m having problems getting my emailer to work in my Flash file. I used the onClipevent showed in the Kirup tutorials but my emailer for some reason, just kept looping. So I just set it to gotoandstop at the frame with the thank you on it but then the email doesn’t send. If anyone can help that’d be great, thanks.

My Code for the form is:

```auto
onClipEvent(data){
 // show welcome screen
 _root.nextFrame();
}

```

The send button:

```auto
on (release) {
 // send variables in form movieclip (the textfields)
 // to email PHP page which will send the mail
 form.loadVariables("email.php", "POST");
}

```

and the PHP file:

```auto
<?php
 
$sendTo = "[EMAIL="brendand@money4shop.com"]brendand@money4shop.com[/EMAIL]";
$subject = "My Flash site reply";
 
$headers = "From: " . $_POST["name"] ."<" . $_POST["email"] .">
";
 
$headers .= "Reply-To: " . $_POST["email"] . "
";
 
$headers .= "Return-path: " . $_POST["email"];
 
$message = $_POST["message"];
 
mail($sendTo, $subject, $message, $headers);
?>

```
