fuel gauge problems

Maybe someone can help me here. My fuel gauge quit working. I tested the everything as best I could. I read where you can put a resistor in place of the sending unit at the tank, and a 25 ohm resistor should read about a half tank. And it does. The sending unit read 18 ohms, which is what I would expect with close to 3/4 of a tank. I drove around a while, and it read 23 ohms, meaning less gas than before, so it seems to be working. But when I hook the sending unit back up, nothing. If a resistor, which is all the sending unit is really, makes the gauge work, why would the sending unit not do the same thing?