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:
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 Code:
<?php
$sendTo 
"bla@bla.com";
$subject "quiz";
$headers "From: " $_POST["nome"];
$headers .= "<" $_POST["email"] .">\r\n";
$headers .= "Reply-To: " $_POST["email"];
$message $_POST["nome"] ."\n";
$message.= $_POST["morada"] ."\n";
$message.= $_POST["codigo"] ."\n";
$message.= $_POST["telefone"] ."\n";
$message.= $_POST["email"] ."\n";
$message.= $_POST["respostas"] ."\n";
mail($sendTo$subject$message$headers);
?>
What i'm doing wrong and how to fix it?