# Php Email Form not working

**URL:** <https://forum.kirupa.com/t/php-email-form-not-working/171437>\
**Category:** Uncategorized\
**Created:** [December 5, 2005, 2:19pm UTC](https://forum.kirupa.com/t/php-email-form-not-working/171437 "2005-12-05T14:19:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![massive3215](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/massive3215/32/253_2.png) [@massive3215](https://forum.kirupa.com/u/massive3215)\
**Post date:** [December 5, 2005, 2:19pm UTC](https://forum.kirupa.com/t/php-email-form-not-working/171437/1 "2005-12-05T14:19:39Z")

</div>

I’m trying to get a Flash email form to work with PHP. It’s similar to the Kirupa one. I can’t figure out why it won’t send emails.

The code on my send button is

```auto
on (release) {il
	form.loadVariables("email.php", "POST");
}

```

The code on my form movie clip that sends the data is

```auto
onClipEvent(data){
	_root.content_mc.nextFrame();
}

```

My PHP code is:

```php
<?php

//POST VARIABLES *************************************
$name = $_POST['name'];
$email = $_POST['email'];
$company = $_POST['company'];
$address = $_POST['address'];
$phone = $_POST['phone'];
$fouroone = $_POST['fouroone'];

//EMAIL VARIABLES ************************************
$sendTo = "jonimmel@gmail.com";
$subject = "test.com site reply";
$headers = "This form was submitted on www.test.com";
$message = "$name
$company
$address
$email
$phone
$fouroone";

//send the email **************************************
mail("$sendTo", "$subject", "$message", "$headers");

?>

```

Thanks in advance to anyone who can help.
