# Trouble with Kirupa's php contact form tutorial

**URL:** <https://forum.kirupa.com/t/trouble-with-kirupas-php-contact-form-tutorial/273544>\
**Category:** Uncategorized\
**Created:** [October 16, 2008, 5:46pm UTC](https://forum.kirupa.com/t/trouble-with-kirupas-php-contact-form-tutorial/273544 "2008-10-16T17:46:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![poprobot](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@poprobot](https://forum.kirupa.com/u/poprobot)\
**Post date:** [October 16, 2008, 5:46pm UTC](https://forum.kirupa.com/t/trouble-with-kirupas-php-contact-form-tutorial/273544/1 "2008-10-16T17:46:23Z")

</div>

sorry to be such a noob - I’m more of an animator than a prgrammer - but have created a contact form for a client using Kirupa’s tutorial with Flash CS3 (publishing action script2)and the attached php code… I beleive the problem is with the php so hopefully someone here can solve the mystery…

The contact form is exactly like the one detailed in Kirupa’s tutorial:[http://www.kirupa.com/developer/actionscript/flash\_php\_email](http://www.kirupa.com/developer/actionscript/flash_php_email).

I have added the fields “phone” (and named the input text field with the appropriate var\_name "phone)  
and added the $post code for the phone field into the php file

the results: I am able to receive the contact form email with the message data however… data for the “name” field, and “phone” field are missing

also - the emailaddress appears only in the reply-to section of the email and not in the body - can this be rectified somehow also?

Here is the php code (identical to Kirupa’s tutorial with the addition of the “phone” tags)

\<?php

$sendTo = "bongodogdesigns@gmail.com";  
$subject = “[ColorWhims.com](http://ColorWhims.com) Contact”;

$headers = “From: " . $\_POST[“firstName”] .” “. $\_POST[“lastname”] . “\<” . $\_POST[“email”] .”\>  
";

$headers .= "Reply-To: " . $\_POST[“email”] . "  
";

$headers .= "Return-path: " . $\_POST[“email”] . $\_POST[“phone”];  
$message = $\_POST[“message”];  
mail($sendTo, $subject, $message, $headers);

?\>

and just in case you need it… here is the action script attached to the "send"button in Flash:

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

I realy appreciate your help with this… anyone? anyone?
