PDA

View Full Version : Contact form (have use search)


razor18
07-05-2006, 04:31 AM
Hi everyone, first I would like to thank for taking notice of my post.

Here’s my pickle, am creating a basic flash website, but I’m stuck at the contact form section. I have created the contact form already, all I need is help with the submit button code and the PHP form script. I have tried many script and example downloaded from other forum but none of them work. I have spoke with my hosting company and they say they do support PHP.

Greatly appreciate for any help.

Flash Gordon
07-05-2006, 05:05 AM
Welcome to AS[org] :)

I can't help debug your PHP script if you don't include it ;)

Have you seen the tutorial in my sig or on flashvacuum.com ?

razor18
07-05-2006, 02:53 PM
i have check out your tutorial Gordon and it still doesnt work. i have tested the email address many time, it recieve and forward email fine. I dont know what the problem is.

here what i have come up with.

submit botton

on (release) {
loadVariablesNum ("email.php", 0, "POST");
tellTarget("txt")
{
name = "";
surname = "";
email = "";
phone = "";
company = "";
message = "thabk you";
} // End of TellTarget
}


PhP script

<?
$to = "[email protected]";
$subject = "subject of emails";

$name = $_POST['name'];
$surname = $_POST['surname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$company = $_POST['company'];
$message = $_POST['message'];
$headers = "From: ". $name . "<" . $email . ">\r\n";
$headers .= "Reply-To: " . $email . "\r\n";
$headers .= "Return-path: ". $email;
//how to the information will appear in your email
$msg = "\r\nName: " .$name . "\r\ncompany: " .$company. "\r\nPhone: " . $phone;
$msg .= "\r\nEmail: " .$email;
$msg .= "\r\nMessage: " .$message;

//echo ("$to, $subject, $msg, $headers");

mail($to, $subject, $msg, $headers);
//echo "message sent";

?>

Flash Gordon
07-05-2006, 04:44 PM
hard code an PHP example to see if it is a problem with you php


mail("[email protected]", "Test Message", "This is my message", $headers);

but don't forget to make the correct headers. I just left them out there.

razor18
07-06-2006, 06:42 AM
the script doesn't work for some reason, any suggestion? and what do you mean by hard code, sorry but all these is very new to me.

Kyriakos
07-06-2006, 01:13 PM
try this: http://www.flash-db.com/SendMail/