# Flash/php form help

**URL:** <https://forum.kirupa.com/t/flash-php-form-help/258976>\
**Category:** flash\
**Created:** [April 30, 2008, 12:38am UTC](https://forum.kirupa.com/t/flash-php-form-help/258976 "2008-04-30T00:38:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian914](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@brian914](https://forum.kirupa.com/u/brian914)\
**Post date:** [April 30, 2008, 12:38am UTC](https://forum.kirupa.com/t/flash-php-form-help/258976/1 "2008-04-30T00:38:44Z")

</div>

I have this form in my flash file and I can’t quite make it do what I want.  
I get the form to send, but I don’t get a confirmation if it sent out OK, and I also can’t make the auto response work in the php file. My Flash file has the following AS in it.

this.send\_btn.onRelease = function() {  
validateForm(tf\_Name,tf\_Email,tf\_Subject,tf\_Comments);  
};

function validateForm(tName:String, tEmail:String, tSubject:String, tMsg:String):Void {  
trace(“the else was called…”);  
var send\_lv = new LoadVars();  
var result\_lv:LoadVars = new LoadVars();  
result\_lv.onLoad = function(success:Boolean) {  
trace(this.tf\_showAlertMsg);  
if (success) {  
this.tf\_showAlertMsg.text = “Thank you for sending us an email”;  
} else {  
this.tf\_showAlertMsg.text = “Email did not go through”;  
}  
};

send\_lv.Name = tName;  
send\_lv.FromEmail = tEmail;  
send\_lv.Subject = tSubject;  
send\_lv.Comments = tMsg;  
send\_lv.status = “”;  
send\_lv.sendAndLoad(“php/sendContact.php”,result\_lv,“Post”);  
this.showAlertMsg(“Sending…”);  
}

My PHP looks like this:

\<?php  
$debug = true;  
$debug = false;

$Name = $HTTP\_POST\_VARS[“Name”];  
$Email = $HTTP\_POST\_VARS[“FromEmail”];  
$Subject = $HTTP\_POST\_VARS[“Subject”];  
$Comments = $HTTP\_POST\_VARS[“Comments”];

//create the message  
$Intro = "Name: $Name  
"."Subject: $Subject  
"."Email: $Email

“;   
$Message = $Intro.”

".$Comments;

//if($debug)  
echo "mes1 $ToEmailType $ToEmail $Subject $Message From: $Name $FromEmail  
";

//mail to Eric Tillinghast  
mail("brian@agilitygraphics.com",“website contact form - $Subject”, $Message, “From: $Name \<”.$Email."\>");

//mail acknowledgement to the user  
$AcknowledgementMessage = "Hello $Name.

Thank you for your interest in my art. I have received your email and will respond as soon as possible.

Thank You,  
Eric Tillinghast.

www.erictillinghast.info";  
mail($Name."\<".$Email."\>", “I have received your email”, $AcknowledgementMessage, “From: Eric Tillinghast \<info@erictillinghast.info\>”);

echo “&Status=Your quote request has been sent.”;  
?\>

How can I get the php to report back to the result\_lv and get the confirmation email from the form.  
Thanks a lot for any help with this!!!

---

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 8, 2008, 4:38pm UTC](https://forum.kirupa.com/t/flash-php-form-help/258976/2 "2008-05-08T16:38:16Z")

</div>

php.ini is a server setup file, be sure that mailfunction is activated from there. for these questions turn to a PHP forum

---

<div class="post-metadata">

**Author:** ![project107](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@project107](https://forum.kirupa.com/u/project107)\
**Post date:** [May 8, 2008, 4:54pm UTC](https://forum.kirupa.com/t/flash-php-form-help/258976/3 "2008-05-08T16:54:25Z")

</div>

Try this: [http://www.kirupa.com/forum/showthread.php?t=287107](http://www.kirupa.com/forum/showthread.php?t=287107)  
Only edit the email address the mail should be delivered to. If it works okay, we can take it from there. 🍺

---

<div class="post-metadata">

**Author:** ![mmarmor](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mmarmor](https://forum.kirupa.com/u/mmarmor)\
**Post date:** [May 9, 2008, 9:21pm UTC](https://forum.kirupa.com/t/flash-php-form-help/258976/4 "2008-05-09T21:21:29Z")

</div>

Macsy and project107,

Thanks to both. Finally with the form sent by project 107. I am be able to receive de e-mail.  
I would like to include in the form an aditional field for telefon number and receive it in the mail.  
If you have a form with this option a would appreciate it.  
Thanks

---

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 9, 2008, 9:27pm UTC](https://forum.kirupa.com/t/flash-php-form-help/258976/5 "2008-05-09T21:27:13Z")

</div>

just add a field with instance name phone , and copy it according to the other feilds.

---

<div class="post-metadata">

**Author:** ![mmarmor](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mmarmor](https://forum.kirupa.com/u/mmarmor)\
**Post date:** [May 13, 2008, 4:06pm UTC](https://forum.kirupa.com/t/flash-php-form-help/258976/6 "2008-05-13T16:06:57Z")

</div>

Macsy  
Works Ok. Thanks
