If your wash machine is got a hose on it and drains in a standpipe like code says how is water getting in the machine, either you have a home made connection of some kind are your pump does not pump it all out. It has to be a problem that your caused. Have you got it con. to the pipes from upstairs and they are partly stopped and backing up in your machine. Make a little drawing and show how you have it con.