Have object rotate when player does
If your basically going to have the cart as the player's body, then parent the camera to the cart.  

In this example, I'm using a pretty blue cube, and not a cart.



This is actually rather simple - you want the camera to be able to look around, and then drive the cube/player/cart in the direction the camera is facing, and have the camera follow? easy. I'm assuming your using the mouse look actuator on the camera.



If you are, delete or disable it for now, because there is a better way. While this works for the camera, it only works in terms of a spectator, free floating camera. This will make more sense if you think of it in terms of a battleship gun. On a battleship turret, the base rotates from left to right, and the barrel, mounted in the base, rotates up and down. Although the barrel can point in all directions, the base remains even. We want a setup similar to this. On the player/physics cube/ cart, put a mouselook actuator which only allows motion right to left. 



Why is the Y disabled? In 2D terms, the X axis is left to right, and the Y axis is top to bottom. By disabling the Y, we are only allowing the mosuelook actuator to respond to mouse movement from left to right.

Now, if we push play, we should be able to move the mouse and rotate the camera from side to side.

Now, we can put the same logic setup on the camera, but this time, the mouse look actuator will only respond to mouse motion on the Y axis.



Now, we can put the WASD logic on the physic cube/player/cart/whatever, and it will move forward along the ground in the direction the camera is facing - not into the ground when looking down, or up into the sky when looking up.



Now, for new BGE users, I think it is sometimes helpful to play around with an already working file - see how or why things work. Staring at a blank file can only help someone so much, so feel free to play around with this blend.