Hi, I need help in making the flash email form work. actually the form is working but once i insert it to a template it doesn't send out emails.

My code on the buttons:

on(release)
{
if (_parent.name1 == "" ||
_parent.email == "" ||
_parent.message1 == "") {
_parent.gotoAndStop(3);
}
else
{

_parent.loadVariablesNum("email.php", 0, "POST");
_parent.EmailStatus = "email sending..";
_parent.name1 = "";
_parent.email = "";
_parent.message1 = "";
_parent.gotoAndStop(2);
}
}


My php code:

<?

$destination="[email protected]";
$name=strip_tags($_POST['name1']);
$email=strip_tags($_POST['email']);
$con=strip_tags($_POST['message1']);

$from="$email, $name";
$subject="Site E-mail" ;
$mes="Name : $name $name2\n
Email: $email\n
Message: $con";



mail($destination,$subject,$mes, "From: ".$name." <".$email.">");
Print "&_root.pages.email.EmailStatus=MESSAGE SENT&";
?>

Help me find a way to make it work on a template. thanks!