// Скрипт проверки // Соединямся с БД $link=mysqli_connect("localhost", "usertourdom", "kZTEwiT9KU9eQQ9", "dbtourdom"); if (isset($_COOKIE['email']) and isset($_COOKIE['hash'])) { $query = mysqli_query($link, "SELECT * FROM selectum WHERE email = '".$_COOKIE['email']."' LIMIT 1"); $userdata = mysqli_fetch_assoc($query); if(($userdata['user_hash'] !== $_COOKIE['hash']) or ($userdata['email'] !== $_COOKIE['email'])) { setcookie("email", "", time() - 3600*24*30*12, "/"); setcookie("hash", "", time() - 3600*24*30*12, "/", null, null, true); // httponly !!! } else { $auth = true; } } else { } ?>
