Are you putting the form processor in the same script as the form? If so, it is attempting to process before the post values are set (everything is executing).
Wrap all the processing code in a conditional that checks if the form has even been sent.
if(isset($_POST) && array_key_exists('name_of_your_submit_input',$_POST)){ //process form! }else{ //show form, don't process yet! You can break out of php here and render your form } Scripts execute from the top down when programming procedurally. You need to make sure the program knows to ignore the processing logic if the form has not been sent. Likewise, after processing, you should redirect to a success page with something like
header('Location:http://www.yourdomainhere.com/formsuccess.php'); I would not get into the habit of supressing notices or errors.
Please don't take offense if I suggest that if you are having these problems and you are attempting to build a shopping cart, that you instead utilize a mature ecommerce solution like Magento or OsCommerce. A shopping cart is an interface that requires a high degree of security and if you are struggling with these kind of POST issues I can guarantee you will be fraught with headaches later. There are many great stable releases, some as simple as mere object models, that are available for download.