Your car has a shift-lock solenoid which keeps the car from being shifted out of park unless you have your foot on the brakes (a safety mechanism). If that solenoid is going bad of is getting a bad connection it will start giving these type of problems. (The stop light switch could also be out of adjustment) the interlock solenoid is located in the steering clomun or floor shifter depending on which one you have. Try this, while in the car with all doors closed, seat belt fastened, radio off, turn the ignition to the ON position and them push the brake pedal. You should hear a click (the shift interlock solenoid releasing). Repeat this several time to be sure it releases each time. It it only releases sometime check the solenoid for power time you depress the brake pedal. The YE/VT wire on the solenoid is the power wire (black is ground). It if gets power every time you press the brake pedal, yet doesn't release everytime, then the solenoid id faulty and need to be replaced.