The UK PM told parliament he still wants Brexit to happen on October 31 after MPs dealt a major blow to his plan.