If all paths with the same endpoints are homotopic, then the space is simply connected. Let $X$ be a path connected space such that any two paths in $X$ having the same end points are path homotopic. Then prove that $X$ is simply connected.
I am totally stuck on this problem. Can someone help me please?  Thanks for your time.

If every two paths having the same end points are path homotopic, then every loop $w: S^1 \longrightarrow X$ can be deformed into a constant path, a point. Which is the definition of simply connected, isn't it?
