Flash/php Mailform

I’ve done a mail form for flash. The mail form is the mail.swf, and it pop-up in the flashpage, treesite.swf. Everything works just fine, the mail form is poping up. But when i push the send button it contacts the php-form, send.php. But something is not working at this point, because the onlything that’s being send is From, Mail, Message. That is the headers from the php document.

Im not getting any confirmation either from the mailform, it should go to 10th frame or the 20th if it getting send.

The thing is that have no experience from php, never done a php document before so it’s not that big of a surprise it’s working!

this is the button for the mail pop-up

onClipEvent (enterFrame) {
	if (_root.btn_3, hitTest(_root.head)) {
		_root.createEmptyMovieClip("mail_mc", 65);
		this.loadMovie("mail.swf", "mail_mc") 
		this._x = "230";
		this._y = "190";
		
	} else {
		unloadMovie(_root.mail_mc);
	}
}

this is the mail form

stop();

var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function() {
	senderLoad.theName = theName.text;
	senderLoad.theEmail = theEmail.text;
	senderLoad.theMessage = theMessage.text;
	senderLoad.sendAndLoad("http://www.larsanttila.se/send.php",receiveLoad);
}

receiveLoad.onLoad = function() {
	if(this.sentOk) {
		_root.gotoAndStop("success");
	}
	
	else {
		_root.gotoAndStop("failed");
	}
}

and this is the php document

<?PHP

$to = "mail@larsanttila.se";
$subject = "Mail from homepage";
$message = "Name: " . $theName;
$message .= "
Email: " . $theEmail;
$message .= "

Message: " . $theMessage;
$headers = "From: $theEmail";
$headers .= "
Reply-To: $theEmail";

$sentOk = mail($to,$subject,$message,$headers);

echo "sentOk=" . $sentOk;

?>