Toshiba made a few million of them like that.
Solder just wasn't strong enough given the bad mechanical design / security of the jack. To warranty repair it they soldered it back on and epoxied the jack to the board.
If solder doesn't stick well during soldering, that is usually a sign of lack of flux, or the parts being soldered being either too cold during soldering or dirty / not clean bare metal during soldering.
If not clean/bare, you'll need to scrape off any solder mask or old flux residue, melted plastic, paint, et. al. from the traces and leads being soldered without damaging them or other things.
Just don't overheat the jack / PCB and melt things or cause the traces / solder pads to come off the the board.
Actually if the solder pads / traces have already come off, that'd explain a lack of sticking as well -- there's nothing much left but plastic in the spot where there was supposed to be a metal lead / trace / pad.
Visual inspection should go a long way toward identifying the problem.
Also don't use PLUMBING solder, get some THIN electronics grade lead free solder with internal flux. Like 0.031" or thinner. Don't use a plumbing iron or a general purpose torch either.
Once well soldered, consider finding a way to use non-conductive epoxy to secure the jack, though that would reduce the future repairability of it, so do it carefully after you've verified that it works.. And be sure not to clog the mechanism / mechanical contacts. Hot glue might be a slightly more repairable but weaker / more temporary retention aid. Silicone caulk or RTV silicone adhesive is not really strong enough but if you have a favorable mechanical design that would really let it hold on between nicely shaped strong retention edges / cavities then maybe that could help.. it'd be easy to remove / repair.
Practice soldering some wires / jacks / PCBs NOT critical for the use of your computer to get the technique down before you do in your laptop. Use proper ESD precautions, a grounded wrist strap / static free work area etc.