Flash form works BUT is opening the *.php file

Hello
I have my form working one way but it opens the *.php file.
If i use another method it don’t open the *.php but don’t send the radio button value.

Here is my code:

participar.clickHandler = function() {
 doSubmit();
}
function doSubmit()
{
 if(!form.nome.length){
  trace("enter nome");
  _root.quiz.form.sendStatus.text = "Preencha os campos em branco";
 }else if(!form.email.length){
  trace("enter email");
  _root.quiz.form.sendStatus.text = "Preencha os campos em branco";
 }else if(!form.morada.length){
  trace("enter morada");
  _root.quiz.form.sendStatus.text = "Preencha os campos em branco";
 }else if(!form.codigo.length){
  trace("enter codigo");
  _root.quiz.form.sendStatus.text = "Preencha os campos em branco";
 }else if(!form.telefone.length){
  trace("enter telefone");
  _root.quiz.form.sendStatus.text = "Preencha os campos em branco";
 }else{
 _root.quiz.form.sendStatus.text = "Aguarde por favor";
 userData.respostas = respostas.getValue();
 _root.quiz.form.loadVariables("quiz.php", "POST");
 }
}
/* this code works but open the page quiz.php
{
userData = new LoadVars();
userData.nome = nome;
userData.morada = morada;
userData.codigo = codigo;
userData.telefone = telefone;
userData.email = email;
userData.respostas = respostas.getValue();
userData.send("quiz.php", "", "post");
}
*/

the code that don’t send the radio button value returns this:
[object Object]

my php code is:

<?php
$sendTo = "bla@bla.com";
$subject = "quiz";
$headers = "From: " . $_POST["nome"];
$headers .= "<" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"];
$message = $_POST["nome"] ."
";
$message.= $_POST["morada"] ."
";
$message.= $_POST["codigo"] ."
";
$message.= $_POST["telefone"] ."
";
$message.= $_POST["email"] ."
";
$message.= $_POST["respostas"] ."
";
mail($sendTo, $subject, $message, $headers);
?>

What i’m doing wrong and how to fix it?