Fields shown by are required.

Email is invalid .'; echo '
    '. $error .'
'; exit(); } } $error .= ( empty($Name) ) ? '
  • Please enter your name.
  • ' : null; $error .= ( empty($Email) ) ? '
  • Blank Email is not accepted.
  • ' : null; $error .= ( empty($Message) ) ? '
  • Please enter some comments or questions.
  • ' : null; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); $error .= ( !($resp->is_valid) ) ? '
  • The captcha code entered is incorrect .
  • ' : null; if (!empty($error)) { // What happens when the CAPTCHA was entered incorrectly echo '
      '. $error .'
    '; exit(); } //Next send contact to website admin. $EmailToAdmin = "carlo.dj@messiahpsychoanalyst.org"; //Put your website admin email here. Don't forget quotes. // body of the email your own admin receives $Body = "RE: Contact from visitors"; $Body .= "\n"; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "City: "; $Body .= $City; $Body .= "\n"; $Body .= "Subject: "; $Body .= $Subject; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Message: "; $Body .= "\n"; $Body .= $Message; $Body .= "\n"; // send email to admin $posted = mail($EmailToAdmin, $Subject, $Body, "From: <$Email>"); // redirect to thanks page if ($posted){ echo '

    Thanks By Dysprosium


    Your message has been sent! Thanks for Your Message!

    Click to go to Home page!

    '; //After thank you send an email containing his message to the visitor // prepare email body text $Body = " Madam/Sir,\n Thank you for your message.\n Dysprosium.\n"; $Body .= " ======================================================\n\n"; $Body .= "Name: "; $Body .= $Name; $Body .= ", Esq."; $Body .= "\n"; $Body .= "From: "; $Body .= $City; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Subject: "; $Body .= $Subject; $Body .= "\n"; $Body .= "Message: "; $Body .= "\n"; $Body .= $Message; $Body .= "\n"; // send email mail($Email, $Subject, $Body, "From: <$EmailToAdmin>"); } } ?>