A good way to avoid the refresh problem is to have the form submit to a PHP script that does the database stuff that you need, but have that script print nothing -- instead, at the end of the script, use header("Location: someotherpage.php"); to send them to another page (a "Continue Shopping or Check Out" page, perhaps?) that won't cause any damage if reloaded.
The back button problem is a little trickier. One thing you can do is require users to enable cookies, and then have your script give them a cookie so that if they happen to press the back button, the script will read the cookie and not process the form results a second time. It also helps (perhaps more than the cookie) to have a big message that says "Do not press the back button -- it will screw up your order!"