Flash - formulario flash

   
Vista:

formulario flash

Publicado por fran (7 intervenciones) el 28/12/2009 14:22:38
Hola buenas...llevo un tiempo volviendome loko intentando hacer un formulario en flash, lo he probado todo, he echo todos los tutoriales que hay internet, los sigo al pie de la letra pero al final no me manda el correo. El ultimo tuto q he terminado parece el mas facil..pero dandole vueltas no consigo en que parte del codigo hay q indicarle la direccion de correo a la cual se mandara el correo. Dejo aki el codigo por si alguien puede decirme q es lo q hago mal.
Gracias de antemano.

CODIGO EN EL FRAME 1:

stop();
// Making the default setting for below mentioned textfield variables
name = "";
email = "";
suggestion = "";
//
//-------------------------------------------------------
// Submit Button action
submit.onRelease = function() {
//
//Add Path of the php file
feedbackpath = "mailto.php";
//
str1 = email.indexOf("@");
str2 = email.indexOf("@")+1;
str3 = email.charAt(str1+1);
str4 = email.lastIndexOf(".");
str5 = email.charAt(str4+1);
len = length(email);
counter = 1;
flag = 0;
while (Number(counter)<=Number(len)) {
Char = substring(email, counter, 1);
if (Char ne "@") {
flag = Number(flag)+1;
}
counter = Number(counter)+1;
}
//
//Name field validation
if (name == "") {
condition1 = "";
namemark._visible = true;
} else {
condition1 = "ok";
namemark._visible = false;
}
//E-Mail Address validation
if (str4<=str2 || str3 =="." || str5 =="" || Number(flag) != Number(len-1)) {
condition2 = "";
emailmark._visible = true;
} else {
condition2 = "ok";
emailmark._visible = false;
}
//Suggestion field validation
if (suggestion == "") {
condition3 = "";
suggestionmark._visible = true;
} else {
condition3 = "ok";
suggestionmark._visible = false;
}
//Sending data to php file only if all the above validations are fulfilled
if (condition1 == "ok" && condition2 == "ok" && condition3 == "ok") {
loadVariablesNum(feedbackpath+
"?name="+name+"&email="+email+"&feedback="+suggestion, 0);
gotoAndStop(2);
}
};
//
//-------------------------------------------------------
// Reset Button action
reset.onRelease = function() {
// Making the default setting for below mentioned textfields
name = "";
email = "";
suggestion = "";
// Making '*' Marks Invisible
namemark._visible = false;
emailmark._visible = false;
suggestionmark._visible = false;
};

CODIGO EN EL ARCHIVO PHP:

<?
//Destination Email ID
$to = "dest";

//Name of the Person
$namenew = $_GET['name'];

//Email id of the person
$emailnew = $_GET['email'];

//Feedback detail
$feedbacknew = $_GET['feedback'];

//Subject line of the email
$subjet = "Feedback Form".""."$emailnew";

/************Email body****************/
$matter = "Below are the details filled by".""."$namenew"."\n\n".
"Name:".""."$namenew"."\n\n".
"Email:".""."$emailnew."\n\n".
"Suggestion:".""."$feedbacknew"."\n\n";
/*********************************************/

mail("$to" , $subject" , "$matter", "From: $emailnew");
?>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder