# Email form using PHP doesn't work!

**URL:** <https://forum.kirupa.com/t/email-form-using-php-doesnt-work/163349>\
**Category:** Uncategorized\
**Created:** [September 21, 2005, 7:08pm UTC](https://forum.kirupa.com/t/email-form-using-php-doesnt-work/163349 "2005-09-21T19:08:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danulf](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/danulf/32/555_2.png) [@danulf](https://forum.kirupa.com/u/danulf)\
**Post date:** [September 21, 2005, 7:08pm UTC](https://forum.kirupa.com/t/email-form-using-php-doesnt-work/163349/1 "2005-09-21T19:08:57Z")

</div>

ok, so I followed the tutorial by senocular here on kirupa, but it doesn’t send the email right…  
This is my PHP-script:

```php

<?php
$sendTo = "danulf@gmail.com";
$subject = "My Flash site reply";
$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>

```

and the swf, php and fla file is here: [http://danvir.coconia.net/](http://danvir.coconia.net/)

I don’t know the first thing about PHP, and I dont’ really get why there’s firstname and lastname, but I hope that you can help me sort that out aswell! I don’t think that those are needed, but I don’t know how much to delete from it…

EDIT: the .fla can’t be downloaded from there, so it’s here: [www.freewebs.com/danulf/emailform.fla](http://www.freewebs.com/danulf/emailform.fla)
