// if submitted form process and send mail if ($REQUEST_METHOD == "POST") { // just to be on the safe side // Ill strip out HTML tags // (scripting code may mess with some email clients) $myemail = ("enquiries@mpac.co.uk"); $mortgages = strip_tags($mortgages); $insurance = strip_tags($insurance); $protection = strip_tags($protection); $otheradvice = strip_tags($otheradvice); $title = strip_tags($title); $surname = strip_tags($surname); $forename = strip_tags($forename); $address = strip_tags($address); $postcode = strip_tags($postcode); $daytel = strip_tags($daytel); $eveningtel = strip_tags($eveningtel); $mobile = strip_tags($mobile); $email = strip_tags($email); $time = strip_tags($time); $timeother = strip_tags($timeother); $jointappname = strip_tags($jointappname); $maritalstatus1 = strip_tags($maritalstatus1); $gender1 = strip_tags($gender1); $dob1 = strip_tags($dob1); $employment1 = strip_tags($employment1); $job1 = strip_tags($job1); $smoke1 = strip_tags($smoke1); $maritalstatus2 = strip_tags($maritalstatus2); $gender2 = strip_tags($gender2); $dob2 = strip_tags($dob2); $employment2 = strip_tags($employment2); $job2 = strip_tags($job2); $smoke2 = strip_tags($smoke2); $value = strip_tags($value); $loan = strip_tags($loan); $years = strip_tags($years); $purpose = strip_tags($purpose); $firsttimebuyer = strip_tags($firsttimebuyer); $otherinfo = strip_tags($otherinfo); $sendto = "$myemail"; $subject = "Online Enquiry from MPAC Website"; $message = "\n\nInformation submitted to the online enquiry form:\n\n\n\nTHE CLIENT WOULD LIKE ADVICE ON---\nMortgages: $mortgages\nInsurance: $insurance\nProtection: $protection\nOther advice: $otheradvice\n\n\n---BASIC INFORMATION---\nTitle: $title\nSurname: $surname\nForename: $forename\nAddress: $address\nPostcode: $postcode\nDaytime telephone: $daytel\nEvening telephone: $eveningtel\nMobile: $mobile\nEmail: $email\nTime for contact: $time\nAnother time: $timeother\n\n\n---ADDITIONAL INFORMATION---\nJoint applicants name: $jointappname\n\n1st APPLICANT HAS THE FOLLOWING INFORMATION...\nMarital status: $maritalstatus1\nGender: $gender1\nDOB: $dob1\nEmployment: $employment1\nOccupation: $job1\nSmoke: $smoke1\n\n2nd APPLICANT HAS THE FOLLOWING INFORMATION...\nMarital status: $maritalstatus2\nGender: $gender2\nDOB: $dob2\nEmployment: $employment2\nOccupation: $job2\nSmoke: $smoke2\n\nEstimated value of property: $value\nLoan required: $loan\nTerm: $years\nPurpose of mortgage: $purpose\nFirst time buyer?: $firsttimebuyer\nOther relevant information: $otherinfo\n\n\n"; mail($sendto, $subject, $message); } ?>