Dryer turns on when door is closed

My dryer turns on every time the door is closed when a drying cycle is not complete. Normally I had to push the knob on the control panel for the dryer to start running again. Now I have to turn the control knob to end the drying cycle every time I want to shut it off before the cycle is done.

I need to know what part has failed and needs replaced.

Thanks!

Here are your parts
http://www.appliancepartspros.com/partsearch/modelsearch.aspx?model=PYE2300AYW

Sounds like the push to start switch is bad.
I believe it is part of the timer on this unit.

Check it with a meter.
Looks like it is S to M on the timer.
It should be infinite ohms when not activated.
Be sure to disconnect the wires going to one side of it when measuring it. This prevents you from reading an alternate/parallel circuit path.

Also be sure to unplu the unit before working on it.