Here's a quick mechanism for you to download and try. You can download it for free at the end of this post. It is a simple joint designed to move both back and forth and side to side. It could be used as the waist joint in a bendable character with friction locks to hold it in place once it is posed. 

Print out two copies of the file below. I used two different colours of card. Glue the two sliders back to back, notice that they are rotated 90 degrees to each other.

Glue the two hinges inside of the sliders. Line up the end of the small part with the crease in the slider.

Make up the two bodies.

Glue the ends of the bodies to the hinges. 

Place the slider covers over the sliders and glue them down. Make sure you don't get any glue on the slider. Otherwise it won't slide.

That's it, let the glue dry. The joint should now be free to move back and forth and side to side. Now to work out how this fits into a working model.