Re Captcha在PHP中验证后传递空值

时间:2017-02-03 12:52:10

标签: javascript recaptcha

这是我为我的php页面调用第二次recaptcha的代码的一部分。第一种形式的Recaptcha工作正常,但是在验证Recaptcha图像后,第二种形式没有传递价值。 请帮助我开发Web开发....

//这是index.php的一部分     

    $thecity=$ru['d_name'];
    $message;
    if(isset($_POST['description'])){
      $message=$_POST['description'];
    }
        ?>
    <script language="javascript">
        alert ("this is description : ");
    </script><?php

    if(isset($_POST['g-recaptcha-response'])){
      $captcha=$_POST['g-recaptcha-response'];
    }
    /* problem is here captcha is not getting value*/
    if(!$captcha){
      echo '<h2>Please check the the captcha form</h2>';
      exit;
    }
<div id="popup" class="myoverlay">
<div class="mypopup">
<h2 align="center"><strong>Email Us</strong></h2>
<a class="myclose" href="#">×</a>
<div class="mycontent">
<table style="width:100%; height:auto;">
<form action="contactus.php" method="post">
<tr><td align="left"><label><strong>Description:</strong></label</td></tr>
<tr><td><textarea rows="10" cols="92" id="description"name="description" value="" required='required'> </textarea></td></tr>
<tr><td><div class="g-recaptcha" data-sitekey="my site key here"></div></td></td>                        
<tr><td align="center"><input name="submit" id="submit" type="submit" value="send"></td></tr>
</form>
</table>
</div>
</div>
</div>

//这与联系我们页面相同//     否则if($ f1name ==“send”){

/resource1/*

0 个答案:

没有答案
相关问题