Passing the values from one frame to the other is easy. You can just use the HTML target attribute. For example your form would look like this:
<form method="post" action="bottom.php" target="bottom">
<input type="text" name="pallet">
<input type="submit">
</form>
To print the output of bottom you would probably have to use javascript. There is a javascript print function. I think it is just 'document.print()' can't remember, you would have to check. But then all you would need to do in the 'bottom' frame is something like this:
<body onload='document.print()'>
<?php print "pallet = $pallet"; ?>
</body>
You would have to ensure the user has javascript turned on for this to work. You can do this using the <noscript> tags and inside the noscript have a meta tag redirector which will send the user to an error page.
Hope this helps.