A wet floor does not automatically mean a new water heater. Leaks at the connections on top, the drain valve near the bottom, or the relief valve can usually be repaired.
The temperature and pressure relief valve (T&P valve) is a safety device that opens if temperature or pressure gets too high. If it drips, the valve may be failing, or it may be reacting to high water pressure or thermal expansion. Replacing a good valve does not fix a pressure problem, so we find out which. A relief valve should never be capped.
If water is coming from the tank body, a seam or rust at the base, the inner tank has failed. That cannot be patched, and replacement is the honest answer; our water heater replacement page covers that.