PDA

View Full Version : Mail form urg..



LATO
January 26th, 2003, 10:00 AM
why doesn't my mailform work, that's the question... I think it's easier to look at the code than downloading the fla so:

My send button's actions:


on (release) {
if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
mc.EmailStatus = "Please enter an emailaddress";
}
else {
loadVariablesNum ("mailform.php", "0", "Post");
mc.EmailStatus = "Sending...";

}
}

My mailform.php:


<?
$ToEmail = "lato@webstation.be";

$ToName = "LATO";
$ToSubject = "Contact";

$EmailBody = "Sent By: $FirstName $LastName\nSenders Email: $Email\n\nSubject: $Subject\nMessage:\n$ToComments\n";

$EmailFooter="http://www.mysite.be";

$Message = $EmailBody.$EmailFooter;

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$LastName." <".$Email.">");


Print "myAppMain.mc.EmailStatus=Your mail has been sent";

?>

The prob: it shows "Sending..." in "EmailStatus" when I click the Send-button, but it just doesn't send anything.

c0ldfusion
January 26th, 2003, 03:48 PM
try '_root' instead of 'myAppMain':

Print "_root.mc.EmailStatus=Your mail has been sent"; (in your .php file, of course)

anyway, the idea is that your problem consists of the print command that sends to flash a wrong path to your variable; read some tutorials about paths from kirupa