<? if (isset($_COOKIE['login']) and isset($_COOKIE['pass'])) { $login = $_COOKIE['login']; $pass = $_COOKIE['pass']; $u = mysql_query("SELECT * FROM `users` WHERE `login` = '".$login."' and `pass` = '".$pass."' LIMIT 1"); $user = mysql_fetch_assoc($u); if (isset($user['id'])) { if ($user['login'] != $login or $user['pass'] != $pass) { setcookie('login', '', 0); setcookie('pass', '',0); } } } ?>