One Text Field, One Button, One PHP Script

Here is what I am trying to do:

I have an input text field in flash and a button. This text field is for a (“send to a friend”) email that on button release will send a little message to the email provided, i.e. hey [email protected] check out our site!

The problem is it I can not get the email from input to recieve. Here is my mashed php that I am trying to get to work. FYI I know very little about php. Please advise.


on (release) {
 if ( eq "") {
 } else {
  loadVariablesNum("email.php", 0, "POST");


$sendTo = "To " .$_POST["email"]."<" . $_POST["email"] .">\r";
$subject = "Check Out Our Site";

$headers = $headers .= "Reply-To: " . $_POST["email"] . "
$headers .= "Return-path: " . $_POST["email"];
$message .= "

mail($sendTo, $subject, $message, $headers);
print "&success=1&"

Also how can I get it to post to not only the email provided from the text field but to also an email for admin?