Don't toture yourself with lots of extra code. The way image buttons work (according to the spec at www.w3.org anyway) is that they are like little x/y grid maps, and you are getting back the x/y offset of the click of the mouse, stored in your mouse's name. The value you set is ignored, as value is not a valid parameter for an image button.
The good news is, you can just test to see which button was pressed like this:
if (isset($forward)) $dir="forward";
else if (isset($backward)) $dir = "backward";
else $dir="unset";
Since we don't care what actual value the buttons carry, we can just test to see if they've been set, and in the event the form gets submitted via a method other than our buttons, we may want to have a default setting to handle that.