I recently proved the following result after first proving it in $\mathbb{R}$ and generalizing:
$\textit{Proposition:}$ Let $X$ be a $T_1$ space. Then $X$ is connected if and only if for every $a \in X$, the following holds:
There do not exist two nonconstant, continuous functions $f,g: X \rightarrow X$ such that $f(x)=a$ if and only if $g(x) \neq a$ for all $x \in X$.
Now, my proof of $\Leftarrow$ did not use the $T_1$ hypothesis at all, which lead me to suspect that it may be true for all $X$. However, this is not the case, as is illustrated by the following counterexample:
Take $X=\mathbb{R}$ and let $U \subseteq \mathbb{R}$ be open if and only if $U= \emptyset, \mathbb{R}$. $X$ is connected. The counterexample comes from considering the following two functions:
$f(x)=0$ if $x \in \mathbb{N}$, $f(x)=1$ if $x \notin \mathbb{N}$.
$g(x)=1$ if $x \in \mathbb{N}$, $g(x)=0$ if $x \notin \mathbb{N}$
So the statement fails in the most general case, and I started looking for counterexamples with $X$ $T_0$. I can't seem to find any.
$\textit{Question:}$ Can the $T_1$ hypothesis in the proposition be weakened to $T_0$?
$T_0$ is not enough.
For $n\in\Bbb N$ let $U_n=\{k\in\Bbb N:k\ge n\}$, and let $\tau=\{\varnothing\}\cup\{U_n:n\in\Bbb N\}$; $\tau$ is a $T_0$ topology on $\Bbb N$. Let
$$f:\Bbb N\to\Bbb N:n\mapsto n+1$$
and
$$g:\Bbb N\to\Bbb N:n\mapsto\begin{cases} 0,&\text{if }n=0\\ 1,&\text{if }n\ge 1\;. \end{cases}$$
Check that $\langle\Bbb N,\tau\rangle$ is connected, $f$ and $g$ are non-constant and continuous with respect to $\tau$, and $f(n)=1$ if and only if $g(n)\ne 1$.