Solution 1:

Let $X$ be any infinite dimensional normed linear space. Then there exists a dis-continuous linear functional $f$. Choose $x_0$ such that $f(x_0)=1$ and define $Px=f(x)x_0$. Then $P^{2}=P$ and $P$ is not bounded since $f$ is not continuous.