Attention! You must enter your name.'; exit(); } else if(trim($email) == '') { echo '
Attention! Please enter a valid email address.
'; exit(); } else if(trim($phone) == '') { echo '
Attention! Please enter a valid phone number.
'; exit(); } else if(!is_numeric($phone)) { echo '
Attention! Phone number can only contain digits.
'; exit(); } else if(!isEmail($email)) { echo '
Attention! You have entered an invalid e-mail address. Please try again.
'; exit(); } if(trim($subject) == '') { echo '
Attention! Please enter a subject.
'; exit(); } else if(trim($comments) == '') { echo '
Attention! Please enter your message.
'; exit(); } else if(!isset($verify) || trim($verify) == '') { echo '
Attention! Please enter the verification number.
'; exit(); } else if(trim($verify) != '4') { echo '
Attention! The verification number you entered is incorrect.
'; exit(); } if(get_magic_quotes_gpc()) { $comments = stripslashes($comments); } // Configuration option. // Enter the email address that you want to emails to be sent to. // Example $address = "joe.doe@yourdomain.com"; //$address = "example@example.net"; $address = "mdali_siddique@yahoo.com"; // Configuration option. // i.e. The standard subject will appear as, "You've been contacted by John Doe." // Example, $e_subject = '$name . ' has contacted you via Your Website.'; $e_subject = 'You have been contacted by ' . $name . '.'; // Configuration option. // You can change this if you feel that you need to. // Developers, you may wish to add more fields to the form, in which case you must be sure to add them here. $e_body = "You have been contacted by $name with regards to $subject, their additional message is as follows." . PHP_EOL . PHP_EOL; $e_content = "\"$comments\"" . PHP_EOL . PHP_EOL; $e_reply = "You can contact $name via email, $email or via phone $phone"; $msg = wordwrap( $e_body . $e_content . $e_reply, 70 ); $headers = "From: ali@uparrowconsulting.com" . PHP_EOL; $headers .= "Reply-To: $email" . PHP_EOL; $headers .= "MIME-Version: 1.0" . PHP_EOL; $headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL; $headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL; if(mail($address, $e_subject, $msg, $headers)) { // Email has sent successfully, echo a success page. echo "
"; echo "
"; echo "

Email Sent Successfully.

"; echo "

Thank you $name, your message has been submitted to us.

"; echo "
"; echo "
"; } else { echo 'ERROR!'; }