|
-
[CS3] AS2 Flash email form help please...
Hi Guys
Ive made this email form from kirupa which works great...
http://www.kirupa.com/developer/acti..._php_email.htm
I want to add a phone number variable/field to it, so when the email comes thru to me I have their phone number too.
Im sure its pretty simple and ive tried implementing it myself but cannot get it to work now.
Please help.
Thanks
Ben
-
I Love India
Hello,
Do u want to send the phone numbers from the flash to mail?
If s
then to get the number say "phone" - the variable in which u are stored the phone number value in php use
$phone = $_POST["phone"];
then concatenate the phone variable after the message body
like
$message = $_POST["message"].$phone;
then as given in the kirupa u can follow.
All the best.
-
Hi Nalini
Thanks for your response. I am just looking at this now, I have labelled the variable in the flash to 'phone' and have the following in my php, is that right?
<?php
$sendTo = "email address goes here";
$subject = "Subject line goes here";
$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . " " . $_POST["email"] ." \r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"].$phone;
$phone = $_POST["phone"];
mail($sendTo, $subject, $message, $headers);
?>
Please come back to me.
Thanks for your help.
Ben
-
I Love India
-
Hi Nalini - im afraid it doesnt work. Any ideas?
-
I Love India
Hi,
PHP Code:
<?php
$sendTo = "email address goes here";
$subject = "Subject line goes here";
$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . " " . $_POST["email"] ." \r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$phone = $_POST["phone"];
$message = $_POST["message"].$phone;
mail($sendTo, $subject, $message, $headers);
?>
I checked this... note that the phone variable should be set before it is concatenated..
THanks,
-
I Love India
Also to ensure mail has been sent to the receipient check using if
PHP Code:
if (mail($sendTo, $subject, $message, $headers)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
Hope this will help u.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|