Skip to content
Advertisement

what a mistake that makes my reCAPTCHA returns message “not validate reCAPTCHA tokens”?

Tried many ways to implement google recaptcha, but in my admin console shown message: “your site does not validate reCAPTCHA tokens”.

Script included on the top of HTML page

JavaScript

My php realized form

JavaScript

My javascript reCAPTCHA code

JavaScript

My php code for submiting for data

JavaScript

Advertisement

Answer

The issue I believe is a simple one. The original syntax error as per the comment was a curve ball but on closer inspection and some rudimentary testing reveals that the spelling of g-recaptcha-response in the PHP and g-recaptcha_response in Form were causing the problem.

JavaScript
Advertisement