-
PHP Form Fields Show up Empty?
I have used this form once before and it worked out fine. I copied and pasted to use on another website (by the same owner).
Why are my fields returning empty (when I recieve the email)?
<?
/*
$Id: contactform.php, v 1.00 2003/09/13 01:58:22 hpdl Exp $
PHPcube, Contact Us Form
http://www.phpcube.com
Copyright (c) 2003 PHPcube.com
*/
//----------Configuration Area ------
//----------Modify section -----------
//The Email Address in which you would like to receive technical support requests
$EmailAddress = "shelliez@hotmail.com";
//The Subject of the email message you receive when someone sends a technical support requests
$EmailSubject = "HNL Design and Manufacturing, Ltd. Contact - Request Information";
//The URL of the page you would like to redirect the user to when they have
//successfully submitted a technical support request
$ResultPage = "thanks.php";
//Should the script send an email to the user when it has successfully sent
//the technical support request to your defined mailbox? Yes or No
$ReplyBoolean = "Yes";
//The Name in which you would like to use as the sender of the confirmation email
$SenderName = "HNL Design and Manufacturing, Ltd.";
//The Email address from which the script will use to send the email to the user
$SenderEmailAddress = "sales@hnldesign.ca";
//The Subject of the email message your user receives as a confirmation letter
$SenderEmailSubject = "HNL Design and Manufacturing Request for Information Received";
//The body of the email message your user receives
$SenderBody = "Thank you for your inquiry. One of our HNL Design and Manufacturing Representatives will respond to your quote shortly. ~ HNL Design and Manufacturing";
//========== PHP Script ==========
//========== Don't modify below this line if you don't know how to do=============
mail( "$EmailAddress", "$EmailSubject",
"\nFirstName: $FirstName \nLastName: $LastName \nCompany: $Company \nAddress: $Address1 \nAddress2: $Address2 \nCity: $City \nState: $State \nZip: $Zip \nPhone: $Phone \nEmail: $Email \nMachine: $Machine \nModel#: $Model \n\nAttachment: $Attachment", "From: $txtemail" );
$ReplyBoolean = strtolower($ReplyBoolean);
if($ReplyBoolean == "yes") {
mail( "$email", "$SenderEmailSubject", "Dear $FirstName $LastName, \n\n$SenderBody \n\n$SenderName", "From: $SenderName <$SenderEmailAddress>" );
}
header( "Location: $ResultPage" );
?>
-
-
I can't see where you're getting the fields from that form the content of the email, eg $FirstName, $LastName.
Is there some code that you haven't posted?
-
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
Bookmarks