diff --git a/enter.php b/enter.php index 2d340dc..55064ba 100644 --- a/enter.php +++ b/enter.php @@ -33,7 +33,7 @@ if ($username && $password) { $_SESSION['sid'] = session_id(); $onl = db::c()->query('SELECT user_id FROM online WHERE user_id = "?s"', $data['id'])->fetch_assoc(); - if (isset($onl['id'])) { + if (isset($onl['user_id'])) { db::c()->query('UPDATE online SET date = ?i WHERE user_id = "?s"', time(), $data['id']); } else { db::c()->query('INSERT INTO online (user_id, date, room) VALUES (?i, ?i, ?i)', $data['id'], time(), $data['room']);