正确输入recaptcha时打开jquery对话框&什么时候不对

时间:2014-05-24 17:25:16

标签: php jquery

您好我正在尝试添加两个jquery对话框,这些对话框在重新验证码成功时打开,而在单词不正确时打开。

这是代码:

<?php

 if (isset($_POST['submit_button'])){

 require_once('recaptchalib.php');
 $privatekey = "enter private code here";
$resp = recaptcha_check_answer ($privatekey,
                            $_SERVER["REMOTE_ADDR"],
                            $_POST["recaptcha_challenge_field"],
                            $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {

    $error = 'Oops incorect word<br> Please re enter the words or <br> Press the 
recycle button to generate new words';
     }
else {

    $sent = 'ok'; 
}

谢谢

麦克

0 个答案:

没有答案