Error Undefined variable: response in D:\xampp\htdocs\tools_joomla\tools\...\index.php on line 140
Error ไม่มีตัวแปร response แต่ในโค้ดประกาศตัวแปรไว้เรียบร้อยแล้วดังโค้ด
Code: Select all
$response = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=" . $secretkeyrecaptcha . "&response=" . $keyrecaptcha . "&remoteip=" . $_SERVER['REMOTE_ADDR']), true);
//เรียกใช้ตัวแปร $response
if (isset($_POST['name']) && $response['success'] == true) {
echo '<input type = "hidden" name = "id" value = "' . $_POST['name'] . '" />';
}
ขอบคุณค่ะ