ReCaptcha 2.0 With AJAX

后端 未结 1 862
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 18:31

I have managed to get ReCaptcha 2.0 working in my website. However, it\'s only working when I don\'t use AJAX and I let the form submit \"naturally\".

I want to su

1条回答
  •  悲哀的现实
    2020-12-07 19:27

    Ok, this was pretty silly.

    I have done a couple of things wrong:

    • In the PHP file, all the strings had single quotes on them, and that caused problems.
    • Throughout the testing, I added multiple printings of things in the PHP file, thus the if (status == "ok") was never working. I did get the emails but did not get any conformation that I did and now I see why.
    • When I wanted to check what the PHP file was omitting, I simply went to it's address in the URL and always got an error. Even when the mails were sent. Now I understand that that is not the correct way of checking the logs.

    Thanks to @Samurai who helped my figure out things.


    Final PHP code:

    
    

    0 讨论(0)
提交回复
热议问题