fantim
August 13, 2003, 3:53pm
1
Can you guys check out this script and tell me if I got everything right. For some reason it’s e-mailing me, but not all the variables that I want. I’m only getting an e-mail with a subject of FANTIMdotORG with no from address or anything like that.
<?
// Recieving and Creating Variables...
$Name = $_POST['name'];
$Email = "fantim@myrealbox.com";
$Message = $_POST['message'];
$Subject = "FANTIMdotORG";
$Addy = $_POST['addy'];
$Header = "From: $Name <$Addy>";
//Performing Mail script...
mail($Email, $Subject, $Message, $Header);
?>
system
August 13, 2003, 5:40pm
2
well you’re only telling the script to send the variable $Message. YOu don’t define anything else that is supposed to be contained within Message.
system
August 13, 2003, 5:59pm
3
yup you need to include $Addy in your $Message
system
August 13, 2003, 11:10pm
5
<?php
$to = "youremail@domain.com";
$msg = "Name: $name
";
$msg .= "E-mail: $email
";
$msg .= "Phone: $phonenumber
";
$msg .= "Message: $message
";
mail($to, $subject, $msg, "From: YourHomeSite
Reply-To: $email
");
?>
That’s it.
In your Flash you have to have fields, with variable names:
name
subject
email
phonenumber
message
the “send” button has to have the following code:
on (release) {
loadVariablesNum("mymailform.php", 0, "POST");
}
That should do the trick. It’s as simple as it gets, 'cause I got the impression you’re not very experienced in doing something with php. Neither am I
Remember that this code does absolutely no checking whether the mail as sent or not. I recommend that you write a check bit in there also.
Shouldn’t be too hard, but I left something for you to solve too
Hope that helps.