Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('recaptchalib.php');
- $privatekey = "6Lebz8ESAAAAABRHLuMQHbGvRDrxn_MSB1qTMZ0T";
- $resp = recaptcha_check_answer ($privatekey,
- $_SERVER["REMOTE_ADDR"],
- $_POST["recaptcha_challenge_field"],
- $_POST["recaptcha_response_field"]);
- if (!$resp->is_valid) {
- // What happens when the CAPTCHA was entered incorrectly
- die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
- "(reCAPTCHA said: " . $resp->error . ")");
- } else {
- // Your code here to handle a successful verification
- }
- ?>
- <?php
- $name = $_REQUEST['name'];
- $email = $_REQUEST['email'];
- $comment = $_REQUEST['comment'];
- if(mail( "admin@adamwilson.co.cc", "Contact Form", $comment, "From: $email" )){
- echo ("<p>Message sent to <span>".$email."</span></p>");
- } else {
- echo("<p>Message not sent to <span>".$email."</span></p>");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement