Whirlpool

can’t get to dainage and water won’t drain even though I push the drain button.

A model number may help others help you.

If the unit has a separate drain pump, does it come on?

If yes then you probably have a blockage in the drain line.
A common spot is where the drain connects to the house plumbing.

I am assuming that the drain used to work OK and nothing has been changed with the hook-up.

by trial and error, we fixed the problem. we don’t need any more help, thank you anyway.