Awful Problems With Flash Contacts Form

Hi all I am in the process of making a flash form for my site, but I just cant seem to get it to work so I was wondering if anyone would mind looking at my code please?

The Flash stuff (made a button called send and put these actions on it)


on (release) {
    if (txtname eq "" or txtemail eq "" or txtsubject eq "" or txtmessage eq "") {
        stop();
    } else {
        loadVariablesNum("form.php", 0, "POST");
        gotoAndStop(2);
    }
}

I have 4 text fields with the correct var names txtname txtemail txtsubject and txtmessage.
I also have the following php…


<?php
$to = "my mail address";
$subject = "Contact Us";
$txtemail = $_REQUEST['email'] ;
$txtmessage = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>


I really cant see where I am going wrong, as no emails are being sent
to that address. If anyone could help I would be really grateful.

Many thanks

Sli