This is actually a HTML question, but anyway. the problem is that you have each of your buttons in a separate form, which (besides being poor design) is causing your problem. I believe form tags are considered to be block level elements.
You can try several things:
1 - put style="display: inline;" into your form tags
2 - fix your cgi to have 1 handler that uses the value submitted for the button to determine how to behave
-pete
"Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."