New Google ReCaptcha not posting/receiving 'g-recaptcha-response'

99封情书 提交于 2019-12-01 18:06:20

Your code ran fine on my test server with my own private / public key. It seems trivial, but the only thing I had to add - do you have a submit button in your other form inputs? This is what actually posts the data to your PHP script.

<input type="submit">
</form>

Otherwise, add var_dump($_POST['g-recaptcha-response']); to your bookingverify.php and see what it outputs.

OK I have no idea why but I deleted the exit; in the 2nd IF statement and it worked. Weird.

i had a similar issue. Apparently if you dont click the checkbox the $_POST['g-recaptcha-response'] comes in empty. so just make sure you click it when testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!