laurent129
10-17-2005, 08:44 AM
Hello everybody,
I have a problem with a flash form and php and I can't find te problem.
6 months ago, I ised the same php file and the same Flash movie clip to make the form, and it was working well. Now I am using th esame files and I can not get e)lail sent by this form.
I will really appreciate if someone could help me.
here is the source code from my PHP file:
<?
$to = "laurent128@hotmail.com";
$msg = "$nom\n\n";
$msg .= "$message\n\n";
mail($to, $subject, $msg, "Mail de: LCPortfolio\n\n\nSon nom est:$nom\n\n\nRepondre a: $mail\n\n\n");
?>
and here is the the actionscript taht I put on the frame 1:
nom = "";
sujet = "";
mail = "";
message = "";
bt_envoyer.onRelease = function() {
envoyer();
};
function verifMail() {
if ((mail.indexOf("@")>=2) && (mail.lastIndexOf(".") != -1) && ((mail.indexOf("@")+3)<mail.lastIndexOf(".")) && (mail.lastIndexOf(".")<(mail.length-2))) {
return true;
} else {
return false;
}
}
function verifChamps() {
if (nom != "") {
return true;
} else {
return false;
}
}
function envoyer() {
if ((verifChamps() == true) && (verifMail() == true)) {
loadVariablesNum("form.php", "0", "POST");
gotoAndStop(2);
}
if ((verifChamps() == false) && (verifMail() == true)) {
error_mc.gotoAndPlay(2);
}
if ((verifChamps() == true) && (verifMail() == false)) {
error_mc.gotoAndPlay(2);
}
if ((verifChamps() == false) && (verifMail() == false)) {
error_mc.gotoAndPlay(2);
}
}
---------------
Thank you for your help,
Laurent
I have a problem with a flash form and php and I can't find te problem.
6 months ago, I ised the same php file and the same Flash movie clip to make the form, and it was working well. Now I am using th esame files and I can not get e)lail sent by this form.
I will really appreciate if someone could help me.
here is the source code from my PHP file:
<?
$to = "laurent128@hotmail.com";
$msg = "$nom\n\n";
$msg .= "$message\n\n";
mail($to, $subject, $msg, "Mail de: LCPortfolio\n\n\nSon nom est:$nom\n\n\nRepondre a: $mail\n\n\n");
?>
and here is the the actionscript taht I put on the frame 1:
nom = "";
sujet = "";
mail = "";
message = "";
bt_envoyer.onRelease = function() {
envoyer();
};
function verifMail() {
if ((mail.indexOf("@")>=2) && (mail.lastIndexOf(".") != -1) && ((mail.indexOf("@")+3)<mail.lastIndexOf(".")) && (mail.lastIndexOf(".")<(mail.length-2))) {
return true;
} else {
return false;
}
}
function verifChamps() {
if (nom != "") {
return true;
} else {
return false;
}
}
function envoyer() {
if ((verifChamps() == true) && (verifMail() == true)) {
loadVariablesNum("form.php", "0", "POST");
gotoAndStop(2);
}
if ((verifChamps() == false) && (verifMail() == true)) {
error_mc.gotoAndPlay(2);
}
if ((verifChamps() == true) && (verifMail() == false)) {
error_mc.gotoAndPlay(2);
}
if ((verifChamps() == false) && (verifMail() == false)) {
error_mc.gotoAndPlay(2);
}
}
---------------
Thank you for your help,
Laurent