It seems to happen with almost every favorite pair of pants. You attempt to zip them up and the zipper does not stay in place. It may immediately slip down or move its way down over the course of the day. If you have this problem, you have options that can keep the zipper from undoing itself.
Attempt to lock the zipper. Some zippers will lock if pulled closed and the base is pressed on.
Spray hairspray on the zipper after you have zipped the pants up. Point the can directly at the area and apply a generous amount. This makes the zipper sticky and keeps it from falling down.
Put some candle wax under the zipper. Melt a small amount of neutral colored wax and apply it below the top. Hot wax under the zipper top will keep the zipper in place.
Use a safety pin to keep the zipper in place. Another option that you have is to put a safety pin through the hole of the zipper and keep it up this way. This works for zippers that are not visible.
Try a key ring holder as a last ditch effort. Attach the holder to the pants and then loop around the button at the top to keep the zipper in place.