谷歌版ReCAPTCHA我有一些领域的一个PHP的形式和谷歌在数据库表ReCAPTCHA技术领域和价值商店,但我想使所需的谷歌ReCAPTCHA技术领域。 代码在这里:如何使需要在PHP
<?PHP
if(isset($_POST['submit']))
{
{
$name=$_REQUEST['name'];
$email=$_REQUEST['email'];
$message=$_REQUEST['message'];
$user_id=$_SESSION['id'];
$sql="insert into contact (name,email,message,user_id,status)
values('$name','$email','$message','$user_id','1')";
$qex=mysql_query($sql);
if(!$qex)
{
die("Contact information is not Added".mysql_error());
}
$msgsec="Contact information is Added";
?>
表单代码:
<script src='https://www.google.com/recaptcha/api.js'></script>
<form id='contactus' method='post' >
<input type='hidden' name='submit' id='submit' value='1'/>
<label><h2>Your Name <strong style="color:red">*</strong></h2></label>
<input type="text" class="form-control" required name="name" id="name" placeholder="Please enter you'r name"/>
<label><h2>Your Email <strong style="color:red">*</strong></h2></label>
<input type="email" class="form-control" required name="email" id="email" placeholder="Please enter you'r email address"/>
<label><h2>Your Message <strong style="color:red">*</strong></h2></label>
<textarea class="form-control" required name="message" id="message" placeholder="Please type you'r message here"></textarea>
<br />
<div class='container'>
<div class="g-recaptcha" data-sitekey="6LevWB0UAAAAAEPIUh40HptW3PxfYFqjvz2Wa05D"></div>
</div>
<div class='container'>
<input type="submit" name="submit" class="btn btn-primary" value="SEND MESSAGE">
</div>
</form>
截至目前不需要谷歌ReCAPTCHA技术选项。表单详细信息始终与提交按钮存储在一起,然后单击captcha或不。我想要制作Google ReCAPTCHA。请检查我的代码并让我知道。我错过了什么。
感谢和问候。 ANKIT
阿贾克斯将在这里是一个有效的解决方案。 [作出要求谷歌ReCAPTCHA技术怎么样?] – Akintunde007
的可能的复制(http://stackoverflow.com/questions/29612879/google-recaptcha-how-to-make-required) –
使用复选框服务器端[新谷歌验证码的可能的复制PHP(http://stackoverflow.com/questions/27274157/new-google-recaptcha-with-checkbox-server-side-php) –