/ Published in: PHP

processes contact form input and produces an auto reply
Expand |
Embed | Plain Text
<?php $fields{"Name"} = "Name"; $fields{"Email"} = "Email"; $fields{"Message"} = "Message"; $from = $_REQUEST['Email'] ; $name = $_REQUEST['Name'] ; $headers = "From: $from"; $subject = "NCCDC Web contact -- From contact page"; $body = "WEB CONTACT FROM NCCDC \n\n We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } /*Second email */ $subject2 = "Thank you for contacting NCCDC"; $autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usually within 48 hours. If you have any more questions, please consult our website at www.pdxchild.org"; $autoreply .= "\n\n You Wrote: \n".$_REQUEST["Message"]; else { else { if($send) else } } ?>
You need to login to post a comment.