PDA

View Full Version : Problem PHP mail form with Flash MX



dcnyc
August 6th, 2003, 04:56 PM
I am using a PHP mail form and when I try it, I do receive the e-mail but with nothing in there???
can anyone help? here is the code:

clear button:

on (release) {
name = "";
subject="";
message="";
email="";
}

send button:

on (release) {
if (name eq "" or subject eq "" or message eq "" or email eq "") {
stop ();
} else {
loadVariablesNum ("form.php", 0, "POST");
gotoAndStop (2);
}
}

php form:

<?PHP
$to = "you@domain.com";
$msg = "$name\n\n";
$msg .= "$message\n\n";
mail($to, $subject, $msg, "From: you@domain.com\nReply-To: $email\n");
?>

dudeman
August 6th, 2003, 04:57 PM
Can you strip the code out of your flash file?
Its probally sending those vars from either the root or inside a movie clip and your not linking them properly.

Well, thats my say

Digitalosophy
August 6th, 2003, 08:26 PM
trace you variables in flash do they show?

Jubba
August 6th, 2003, 11:37 PM
also try doing this for each variable...



$subject = $_POST['subject'];
$name = $_POST['name'];

//...etc...etc...etc...


Your host may have superglobals turned off and the PHP script isn't catching the vars from the Flash file... the code above will fix it...