$email_login = $_POST['email_login'];
$password_login = $_POST['password_login'];
if (!empty($email_login) && !empty($password_login)) {
//SECRET
$secretKey = "6LdXb2QUAAAAAH0TLXCaYkcp6I15OnjBsxcoCkZ2";
$responseKey = $_POST['g-recaptcha-response'];
$userIp = $_SERVER['REMOTE_ADDR'];
$url = "https://www.google.com/recaptcha/api/siteverify?secret=$secretKey&response=$responseKey&remoteip=$userIp";
$response = file_get_contents($url);
$response = json_decode($response);
if ($response->success) {
if (empty($_POST['rememberCheckbox'])) {
$_POST['rememberCheckbox'] = null;
}
$doLogin = doLogin($email_login, $password_login, $_POST['rememberCheckbox']);
if ($doLogin) {
header("location:dashbord.php");
} else {
$hasErrorLogin = true;
$msg = "ایمیل یا پسورد اشتباه میباشد";
}
} else {
$hasErrorLogin = true;
$msg = "کد امنیتی صحیح نمیباشد";
}
//SECRET
} else {
$hasErrorLogin = true;
$msg = "ایمیل یا پسورد وارد نشده است";
}
}
?>
It looks like you posted long piece of code, consider editing it out and putting it on hastebin.com and pasting link to it instead. Alternatively, send your code in a file.
Обсуждают сегодня