Below is the code that works, and then the same code with additional fields which does not work. I would really appreciate some help!
Code: Select all
<?
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "e;youremailaddress@example.com"e; ;
$mailto = 'john@eyewolfdesign.com' ;
// $subject - set to the Subject line of the email, eg
//$subject = "e;Feedback Form"e; ;
$subject = "e;Email From Web Site"e; ;
// the pages to be displayed, eg
//$formurl = "e;http://www.example.com/feedback.html"e; ;
//$errorurl = "e;http://www.example.com/error.html"e; ;
//$thankyouurl = "e;http://www.example.com/thankyou.html"e; ;
$formurl = "e;http://www.eyewolfdesign.com/nutkingdom/contact.htm"e; ;
$errorurl = "e;http://www.nutkingdom.com/error.htm"e; ;
$thankyouurl = "e;http://www.nutkingdom.com/thanks.htm"e; ;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$topic = $_POSTї'topic'] ;
$company = $_POSTї'company'] ;
$name = $_POSTї'name'] ;
$email = $_POSTї'email'] ;
$comments = $_POSTї'comments'] ;
$http_referrer = getenv( "e;HTTP_REFERER"e; );
if (!isset($_POSTї'email'])) {
header( "e;Location: $formurl"e; );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "e;Location: $errorurl"e; );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"e;This message was sent from:\n"e; .
"e;$http_referrer\n"e; .
"e;------------------------- COMMENTS -------------------------\n\n"e; .
$comments .
"e;\n\n------------------------------------------------------------\n"e; ;
mail($mailto, $subject, "e;$messageproper\nTopic: $topic\n"e;, "e;\nCompany Name: $company\n"e;, "e;From: \"e;$name\"e; <$email>\nReply-To: \"e;$name\"e; <$email>\nX-Mailer: chfeedback.php 2.03"e; );
header( "e;Location: $thankyouurl"e; );
exit ;
?>Code: Select all
<?
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "e;youremailaddress@example.com"e; ;
$mailto = 'john@eyewolfdesign.com' ;
// $subject - set to the Subject line of the email, eg
//$subject = "e;Feedback Form"e; ;
$subject = "e;Email From Web Site"e; ;
// the pages to be displayed, eg
//$formurl = "e;http://www.example.com/feedback.html"e; ;
//$errorurl = "e;http://www.example.com/error.html"e; ;
//$thankyouurl = "e;http://www.example.com/thankyou.html"e; ;
$formurl = "e;http://www.eyewolfdesign.com/nutkingdom/contact.htm"e; ;
$errorurl = "e;http://www.nutkingdom.com/error.htm"e; ;
$thankyouurl = "e;http://www.nutkingdom.com/thanks.htm"e; ;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$topic = $_POSTї'topic'] ;
$company = $_POSTї'company'] ;
$name = $_POSTї'name'] ;
$email = $_POSTї'email'] ;
$address = $_POSTї'address'] ;
$city = $_POSTї'city'] ;
$state = $_POSTї'state'] ;
$zip = $_POSTї'zip'] ;
$phone = $_POSTї'phone'] ;
$fax = $_POSTї'fax'] ;
$user = $_POSTї'user'] ;
$catalog = $_POSTї'catalog'] ;
$prices = $_POSTї'prices'] ;
$comments = $_POSTї'comments'] ;
$http_referrer = getenv( "e;HTTP_REFERER"e; );
if (!isset($_POSTї'email'])) {
header( "e;Location: $formurl"e; );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "e;Location: $errorurl"e; );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"e;This message was sent from:\n"e; .
"e;$http_referrer\n"e; .
"e;------------------------- COMMENTS -------------------------\n\n"e; .
$comments .
"e;\n\n------------------------------------------------------------\n"e; ;
mail($mailto, $subject, "e;$messageproper\nTopic: $topic\n"e;, "e;\nCompany Name: $company\n"e;,
"e;\nAddress: $address\n"e;, "e;\nCity: $city\n"e;, "e;\nState: $state\n"e;, "e;\nZip: $zip\n"e;,
"e;\nPhone: $phone\n"e;, "e;\nFax: $fax\n"e;, "e;\nUser: $user\n"e;, "e;\nSend Catalog: $catalog\n"e;,
"e;\nPrice List: $prices\n"e;, "e;From: \"e;$name\"e; <$email>\nReply-To: \"e;$name\"e; <$email>\nX-Mailer: chfeedback.php 2.03"e; );
header( "e;Location: $thankyouurl"e; );
exit ;
?>feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]