成功'Recaptcha'输入后如何退出网页 [英] How to exit to a web page upon successful 'Recaptcha' input

查看:90
本文介绍了成功'Recaptcha'输入后如何退出网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好 - 感谢您提供的任何帮助。以下是我用于recaptcha的代码。表格验证。它运行良好除了(如果输入准确的单词时,不是回显''你得到它!''),如下所示,我想退出到另一个网页。什么是取代echo的php代码你得到了它!;而是退出到另一个网页?非常感谢。 linda jimerson [php]< form action =""方法= QUOT;交" >

<?php

require_once(''recaptchalib.php'');

$ publickey =" 6Le-0AEAAAAAAGV3Ln-w867BhcXcme3hvBBpyQy7" ;

$ privatekey =" 6Le-0AEAAAAAAEYvsU9tKhDCaLC3wKhqaCDSvjQ_" ;;

$ resp = null;

$ error = null;

if($ _POST [" submit"]){

$ resp = recaptcha_check_answer($ privatekey,

$ _SERVER [" REMOTE_ADDR"],

$ _POST [" recaptcha_challenge_field"],

$ _POST [" recaptcha_response_field"]);

if($ resp-> is_valid) {

echo你明白了! ;

}否则{

$ error = $ resp->错误;

}

}

echo recaptcha_get_html($ publickey,$ error);

?& gt;


< br />

< input type =" submit"命名= [提交"值= [提交" />

< / form> [/ php]

Hello - Thanks for any help you can provide. Below is code I am using for "recaptcha" form validation. It works well EXCEPT that (instead of echoing ''You got it!'') as shown below when the accurate words are entered, I want to exit to another web page. What is the php code that would replace echo "You got it!"; and instead exit to another web page? Thanks very much. linda jimerson[php]<form action="" method="post" >
<?php
require_once(''recaptchalib.php'');
$publickey = "6Le-0AEAAAAAAGV3Ln-w867BhcXcme3hvBBpyQy7";
$privatekey = "6Le-0AEAAAAAAEYvsU9tKhDCaLC3wKhqaCDSvjQ_";
$resp = null;
$error = null;
if ($_POST["submit"]) {
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($resp->is_valid) {
echo "You got it! ";
} else {
$error = $resp->error;
}
}
echo recaptcha_get_html($publickey, $error);
?&g t;

<br/>
<input type="submit" name="submit" value="submit" />
</form>[/php]

推荐答案

publickey =" 6Le-0AEAAAAAAGV3Ln-w867BhcXcme3hvBBpyQy7" ;;
publickey = "6Le-0AEAAAAAAGV3Ln-w867BhcXcme3hvBBpyQy7";


privatekey =" 6Le-0AEAAAAAAEYvsU9tKhDCaLC3wKhqaCDSvjQ_" ;;
privatekey = "6Le-0AEAAAAAAEYvsU9tKhDCaLC3wKhqaCDSvjQ_";


resp = null;
resp = null;


这篇关于成功'Recaptcha'输入后如何退出网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆