Thanks Jason, that took care of it, but that line is in the code on 317, after checking to see if the cart is empty. It is in the reverse order in the checkout.php page as well. So the eCart program put it in the wrong place both times.
Should checking the cart also be moved to the top of the program?