  Let $H[X]$ and $H[Y]$ be abstract Hardy spaces built upon Banach function
spaces $X$ and $Y$ over the unit circle $\mathbb{T}$. We prove an analogue of
the Brown-Halmos theorem for Toeplitz operators $T_a$ acting from $H[X]$ to
$H[Y]$ under the only assumption that the space $X$ is separable and the Riesz
projection $P$ is bounded on the space $Y$. We specify our results to the case
of variable Lebesgue spaces $X=L^{p(\cdot)}$ and $Y=L^{q(\cdot)}$ and to the
case of Lorentz spaces $X=Y=L^{p,q}(w)$, $1<p<\infty$, $1\le q<\infty$ with
Muckenhoupt weights $w\in A_p(\mathbb{T})$.
