我的表单为100.php,其中ajax调用了200.php。
<html>
<head>
<!-- include reCAPTCHA API JavaScript library given by Google -->
<script src='https://www.google.com/recaptcha/api.js'></script>
<script type="text/javascript"
src="http://ajax.goog
我正在尝试为我的表单创建ReCaptcha。
我已经浏览了文档,但是如何将ReCaptcha转换为表单。我用了私钥,但那不起作用...
这就是网站
它目前正在显示,但如果我没有输入任何内容,表单仍然会提交。
代码:
<?php
require_once('recaptchalib.php');
// Get a key from https://www.google.com/recaptcha/admin/create
$publickey = "i have added the key here";
$privatekey = "i hav
如果我要问的问题看起来很愚蠢的话,请原谅。我是个php新手,所以我正在努力学习。
我受到一个教程的启发,创建了一个运行良好的php联系人表单。
但我想添加reCaptcha。所以我试着这么做。
if ($_SERVER["REQUEST_METHOD"] === 'POST' && isset($_POST['recaptcha_response']))) {
// Get the form fields and remove whitespace.
$name = strip_tags(trim($_POST[&