Pull out the battery, disconnect the power. Now take a close look at the centre post of the charging port in the laptop. Take a thin object and just slightly separate the centre post. This improves contact to the cord.
There should now be some more resistance to plugging in and out the cord, but it should still plug into the laptop