# Mail script Flash using PHP

**URL:** <https://forum.kirupa.com/t/mail-script-flash-using-php/281183>\
**Category:** flash\
**Created:** [February 5, 2009, 8:46pm UTC](https://forum.kirupa.com/t/mail-script-flash-using-php/281183 "2009-02-05T20:46:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronredmond](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@ronredmond](https://forum.kirupa.com/u/ronredmond)\
**Post date:** [February 5, 2009, 8:46pm UTC](https://forum.kirupa.com/t/mail-script-flash-using-php/281183/1 "2009-02-05T20:46:44Z")

</div>

All of the variables are set in the flash website, I actually used the one from kirupa’s site. It works great and everything comes through in my email.

I want to add more than just one $message to the email body. Say I want more of their information to come through… right now I have (name, email, and message) obviously…

I would like to add “library” and “address” to the body of the email, the variables are allready created in the website. Also can I have something in front of each ‘answer’, I have seen it in code but I can’t seem to get it working for myself. For example my email would come in and in the body would be;

Library: (then what they filled in for their library)  
Address: (what they filled in…"  
Message: (their message)

**This is one way I thought it would work but did not…(without the ‘title’ infront of each…**  
$message = $\_POST[“message”];  
$message .= $\_POST[“library”];  
$message .= $\_POST[“address”];

**I also tried, but did not work…(with titles)**  
$message = "Library: " . $\_POST[“library”] . "Address: ". $\_POST[“address”] . "Message: ". $\_POST[“message”];

**Currently, this is my email.php script…**  
\<?php  
$sendTo = “[my@email.com](mailto:my@email.com)”;  
$subject = “[ClientsWebsite.com](http://ClientsWebsite.com) - Libraries Email”;  
$headers = "From: " . $\_POST[“name”];  
$headers .= “\<” . $\_POST[“email”] . "\>  
";  
$headers .= "Reply-To: " . $\_POST[“email”] . "  
";  
$headers .= "Return-Path: " . $\_POST[“email”];

$message = $\_POST[“message”];

mail($sendTo, $subject, $message, $headers);  
?\>
