Old solder joints are failing
Soldered copper pipes should never come apart,much less fall out.

I would seek the advice of a licensed plumber.  Small scale repairs to exposed connections are a medium level skill for DIY.  Whole house replacement of supply lines are an advanced level skill.