[英]Google Captcha in registration form verify.php issue
I used google captcha in my site registration form as google example: 我在网站注册表单中使用了Google验证码作为Google示例:
<form method="post" action="htt://mysite/folder/verify.php">
<?php
require_once('htt://mysite/folder/recaptchalib.php');
$publickey = "your_public_key"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>
<input type="submit" />
</form>
<!-- more of your HTML content -->
</body>
in the verify.php this code 在verify.php中的这段代码
<?php
require_once('htt://mysite/folder/recaptchalib.php');
$privatekey = "your_private_key";
$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
}
?>
everything works fine, the captcha finds out the correct/wrong captcha combination but when i click the submit button it shows a blank page with URL htt://mysite/folder/very.php It should continue to the email verification but it doesn't.. 一切正常,验证码找到正确/错误的验证码组合,但是当我单击提交按钮时,它会显示一个空白页面,网址为htt://mysite/folder/very.php它应该继续进行电子邮件验证,但是不会t ..
Could you please show us your code? 您能告诉我们您的代码吗? Actually, if it goes in the right statement
(if || else)
, the problem is in the part of the code which you don't post. 实际上,如果它在正确的语句中
(if || else)
,则问题出在您未发布的代码部分。
Seems like an error has occurred in your mail sending method. 您的邮件发送方法似乎发生了错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.