prepare("SELECT * FROM users WHERE username = ? OR email = ?"); $stmt->execute([$account, $account]); $user = $stmt->fetch(); if ($user && password_verify($password, $user['password_hash'])) { $_SESSION['user_id'] = $user['id']; header('Location: /'); exit; } else { $error = 'Invalid account or password'; } } } include __DIR__ . '/../includes/header.php'; ?>

New to OKX? Create an account