Mail Form
Posted: Wed Jan 17, 2007 7:10 pm
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I've looked everywhere and tried everything and I'm stumped. Can somebody please help me by letting me know the proper format to send the contents of the form fields below via email? The form is working correctly, but I don't know how to send the contents of each form field I've defined. This is the part of the code below that begins with "mail". As it is now, it's sending on the contents of the "message" field, and I don't know how to add the others. I appreciate any help.Code: Select all
<?
$referers = array('www.website.com', 'website.com.com');
ini_set("SMTP","mail.website.com");
$firstName = $_REQUEST['firstName'] ;
$lastName = $_REQUEST['lastName'] ;
$emailAddress = $_REQUEST['emailAddress'] ;
$phoneNumber = $_REQUEST['phoneNumber'] ;
$addressOne = $_REQUEST['addressOne'] ;
$addressTwo = $_REQUEST['addressTwo'] ;
$phoneNumber = $_REQUEST['phoneNumber'] ;
$city = $_REQUEST['city'] ;
$state = $_REQUEST['state'] ;
$zipCode = $_REQUEST['zipCode'] ;
$message = $_REQUEST['message'] ;
mail( "myemail@website.com", "Form Submitted on Website.com's Form",
$message, "From: $emailAddress");
header( "Location: http://www.website.com/confirm.php" );
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]