process($_POST); // is the actn value set? if (isset($_POST["actn"])){ $actn = $_POST["actn"]; } // are we sending the form? if ($actn=="send") { //========== form data ============== // Personal Details $name=$_POST['name']; $address=$_POST['address']; $phone=$_POST['telephone']; $email=$_POST['email']; // format the address $address=str_replace ("\n",", ",$address); $address=str_replace ("\r","",$address); $body=$openingline." \r\n"; $body .="--------------------------\r\n\r\n"; $body .="PERSONAL DETAILS:-\r\n"; $body .="Name: $name\r\n"; $body .="Address: $address \r\n"; $body .="Telephone: $phone\r\n"; $body .="Email: $email\r\n"; // Date of wedding $wedding_date=$_POST['wedding-date']; $body .="Wedding Date: $wedding_date\r\n"; // Estimated numbers for wedding ceremony $ceremony_numbers=$_POST['ceremony-numbers']; $body .="Estimated numbers for wedding ceremony: $ceremony_numbers\r\n"; // Estimated numbers for evening reception $reception_numbers=$_POST['reception-numbers']; $body .="Estimated numbers for evening reception: $reception_numbers\r\n\r\n"; // Which of the following items are you interested in? $body .="ITEMS OFF INTEREST \r\n"; // Wedding invitations (0/1) $wedding_invites=$_POST['wedding-invites']; $body .="Wedding invitations: ".isyesno($wedding_invites) ."\r\n"; // Evening reception invitations (0/1) $evening_invites=$_POST['evening-invites']; $body .="Evening reception invitations: ".isyesno($evening_invites) ."\r\n"; // Reply cards (0/1) $reply_cards=$_POST['reply-cards']; $body .="Reply cards: ".isyesno($reply_cards) ."\r\n"; //Order of service (0/1) $order_of_service=$_POST['order-of-service']; $body .="Order of service: ".isyesno($order_of_service) ."\r\n"; //Table place cards (0/1) $place_cards=$_POST['place-cards']; $body .="Table place cards: ".isyesno($place_cards) ."\r\n"; //Table plans (0/1) $table_plans=$_POST['table-plans']; $body .="Table plans: ".isyesno($table_plans) ."\r\n"; //Menus (0/1) $menus=$_POST['menus']; $body .="Menus: ".isyesno($menus) ."\r\n"; //Thankyou cards (0/1) $thankyou_cards=$_POST['thankyou-cards']; $body .="Thankyou cards: ".isyesno($thankyou_cards) ."\r\n"; // Calligraphy (hand-written invitations) (0/1) $calligraphy=$_POST['calligraphy']; $body .="Calligraphy: ".isyesno($calligraphy) ."\r\n"; // Save the day cards (0/1) $save_the_day=$_POST['save-the-day']; $body .="Save the day cards: ".isyesno($save_the_day) ."\r\n\r\n"; // ----- Wedding Themes ------ $body .="WEDDING THEMES \r\n"; //Colour scheme (text) $colour_scheme=$_POST['colour-scheme']; $body .="Colour scheme: $colour_scheme\r\n"; //Wedding flowers (text) $wedding_flowers=$_POST['wedding-flowers']; $body .="Wedding flowers: $wedding_flowers\r\n"; //Traditional or Modern (options) $traditional_modern=$_POST['traditional-modern']; $body .="Traditional or Modern: $traditional_modern\r\n\r\n"; //Do you have a specific theme? ie. a historical period, a country etc. (text) $theme=$_POST['theme']; $body .="Do you have a specific theme?: $theme\r\n\r\n"; //Any further information (text) $further_info=$_POST['further-info']; $body .="Further information:- \r\n $further_info \r\n\r\n"; //Would you like us to send you a few samples of our work (0/1) $samples=$_POST['samples']; $body .="Would you like us to send you a few samples of our work: ". isyesno($samples) ."\r\n\r\n"; //Where did you hear about White Paper Design (text) $hear_about=$_POST['hear-about']; $body .="Where did you hear about White Paper Design:- \r\n $hear_about \r\n"; $extra="From: White Paper Design \r\n"; $extra.="Reply-To: White Paper Design \r\n"; mail($recipient,$subject,$body,$extra); $actn=""; // include thankyou.html.inc include ("thankyou.html.inc"); // =========== only used for debugging ====================== //echo "
DEBUG INFO
-------------
".nl2br($body)."
"; //============================================================ }else{ // include enquiry.htm1.inc include ("enquiry.html.inc"); } ?>