Jump to content

Web mail form problem with one field...


thrllkll

Recommended Posts

Hello,

 

The code below is in my contactform.php file which takes variables from a contact form built in flash on my website.  Three of my fields work correctly, but the phone field does not.  It is always displayed as blank in the resulting email.  I've tested the variable being sent from the swf on flash and the telephone variable is populated.  Can anyone see the error in this code regarding $phone? 

 

Thank you very much,

David

 

************************

<?php

 

$recipients = "xxxx@xxxxx.com" . ",";

$subject = "Message from xxxxx.com";

 

// Grab the key from Flash to ensure security

$sendKey  = $_POST['key'];

 

// Only allow the page to send if Flash is the requester

if($sendKey == "email") {

// The following four variables are gathered from Flash

$name = $_POST['name'];

$email = $_POST['email'];

$phone = $_POST['phone'];

$message = $_POST['message'];

 

// Grab todays date

$date = date("F j, Y", time());

 

// This block is the actual message that is sent in the email

$email_info .= "Below is the visitors contact info and message.\n\n";

$email_info .= "Visitor's Info:\n";

$email_info .= "-----------------------------------------\n";

$email_info .= "Name:  " . $name . "\n";

$email_info .= "Email:  " . $email . "\n";

$email_info .= "Telephone:  " . $phone . "\n";

$email_info .= "Date Sent:  " . $date . "\n\n";

$email_info .= "Message\n";

$email_info .= "-----------------------------------------\n";

$email_info .= "" . $message . "\n";

 

$mailheaders = "From: webmaster@xxxxx.com <> \n";

$mailheaders .= "Reply-To: " . $email . "\n\n";

 

if(mail($recipients, $subject, $email_info, $mailheaders)) {

// Print a success for Flash to know the email is being sent

print "&success=true";

}

}

 

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.