I hope that info from Raybyrnes helps. You really need to get out of there.
Does the landlord have any money held in escrow? Did you pay him a security deposit and/or last months rent? That may help you if you can’t come up with funds and need to pay up to move on. You can say that you intended the escrowed money to be your rent since the house was about to be foreclosed on.