I have a flash form I'm using from a downloaded tutorial - it gives basic results - and there is NO verification in Flash, (I'll get to that another time)
However - is there a way to add a autoresponder to this script? - I have a sort of one, but I am absolutely (this week) a newbie to PHP. The code that works I have below, it sends an email with the appropriate field info - believe me, it was a task for me, and many, many tests to get this to work. Dont laugh too much.
--------
-----
This is the other code I have - its for another file - I tried to "add" the return part, but I screwed it up - please help.....
However - is there a way to add a autoresponder to this script? - I have a sort of one, but I am absolutely (this week) a newbie to PHP. The code that works I have below, it sends an email with the appropriate field info - believe me, it was a task for me, and many, many tests to get this to work. Dont laugh too much.
--------
Code:
<?php
//Create a temporary name for accepting the variable sent by Flash
$name = $_POST['name'];
$email = $_POST['email'];
$company = $_POST['company'];
$comment = $_POST['comment'];
//Some fields entered contained whitespace and we dont want them, so use function trim() to
//delete away whitespace
$name=trim($name);
$email=trim($email);
$company=trim($company);
// We use StripSlashes to delete away unwanted backslashes '\'
$comment=StripSlashes($comment);
//We are going to include the website field, and company field insid the $comment here
$message ="Contact Name : $name\n";
$message .="Contact Email : $email\n";
$message .="Contact Company : $company\n";
$message .="Comment : $comment";
//Modified this to suit your email address
$sendto='me@mydomain.com';
//Modified this for displaying the subject in your mail
$subject="Audax Contact Form";
mail($sendto,$subject,$message,"From: $name <$email>") or die("Failure");
//clear all variables
$name='';
$email='';
$company='';
$subject='';
$comment='';
$message='';
echo ("the form has submited successfully");
?>
This is the other code I have - its for another file - I tried to "add" the return part, but I screwed it up - please help.....
Code:
<?php
$recipient = "me@mydomain.com";
$subject = "FormMail";
$date = date( "d/m/Y - H:i:s");
$msg = "***********************************\nName: $name\n";
$msg .= "EMail: $email\n";
$msg .= "WebSite: $phone\n\n";
$msg .= "Message: $comment\n\n";
$msg .= "sent: $date";
mail($recipient, $subject, $msg, "From: <AUDAX Inc.>");
mail($email, "write here the subject of the mail","Automatic Responder\n
************************************
this is the mail sent to the sender
************************************\n
write here what u wont
", "From: <your name site>");
?>