0

I'm trying to use the No captcha recaptcha but I have an issue. I use this code :

if(isset($_POST['g-recaptcha-response'])){
  $captcha=$_POST['g-recaptcha-response'];
}
if(!$captcha){
        $json['error'] = $this->language->get('error_captcha');
}

    if (!isset($json['error'])) {
        $this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post);

        $json['success'] = $this->language->get('text_success');
    }
}

but I always get the error message even if the captcha is filled out. How can I fix this?

wamp
  • 45
  • 1
  • 8
  • Is this all the code? An extra curly bracket closes at the end. Also, you may want to look into `isset()`, `empty()`, or `is_null()` functions instead of using the [if($variable)](http://stackoverflow.com/questions/6693876/how-exactly-does-ifvariable-work) as this converts data types into boolean values. – Parfait Jun 19 '15 at 04:34
  • Need more information? and what error you are getting? – Bruce Jun 19 '15 at 04:44

0 Answers0