PDA

View Full Version : Problem with PHP email Form



genoasboy
September 29th, 2005, 12:19 PM
I'm using the PHP email tutorial in the PHP XML section. I've got it to function properly however; I would like to add more input fields.

When I added my new fields, the email I received only retrieved what was in the message field.

How do I configure my PHP script to retrieve the info from the new fields I've added?

Here's the PHP script:
<?php
$sendTo = "erik@jdoubledesign.com (erik@jdoubledesign.com)";
$subject = "Music Seminar Registration";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["telephone"];
mail($sendTo, $subject, $message, $headers);
?>

Here's he script from my fla. file:
on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}



These are the input fields that I'm adding:
Company
City
State

pbrollwitme
September 29th, 2005, 12:29 PM
i would add to this line:

$message = $_POST["telephone"] . "," . $_POST["Company"] . "," . $_POST["City"] . "," . $_POST["State"] ;

change the "," to whatever you want maybe a <BR> or something like that.
This should work