Thanks again for your help. I will be out of commission for the next five or so days, so please don't think I have given up on this project. Just have other things on the table.
But I did want to ask you a more specific question on sessions/shopping carts, now that I've read more on sessions. (Although very simplistic, hudzilla's page on sessions was quite helpful: http://www.hudzilla.org/phpbook/read.php/10_0_0)
You said that I could store the shopping cart data in the session variables. So let's see if i even remotely understand this correctly.
Let's say the customer is viewing product #7 and wants to order a certain quantity of it. So when they click the "Order this Product" button, in actuality, I will have in the background a "form" and that "Order this Product" button is really acting like a SUBMIT button on a form. And then I will send this form, via POST, to a page called, for example, order.php. And because of the way our business works and with large quantity orders and customization, I guess that I would really only need to send the productID along with this form (because I would not want them to fill out quantity, and other details until the next page). So then from the order page, the product would again show, but this time in a "order form" type of style, and I will give the customer a form to fill specifying the quantity, imprint colors, in-hand date, etc (any thing i need for the order), and then they will hit an "Add to Cart" button. This button will again simply be a submit button for a form, which will then submit the form, via POST, to a page called, for example, cart.php. So on this cart.php page, I would then basically re-iterate to the customer what they just added to the cart, given an "Edit" button, and a continue shopping button, etc. And at this point, all the details from the last form, including the product ID, are now saved in the superglobal $_POST array, and I can access those variables accordingly. So now i need to get this data into the Session array, right? And I guess this can be done for each variable of the POST array as follows:
$SESSION['prodID'] = $POST['prodID'];
$SESSION['quantity'] = $POST['quantity'];
$SESSION['otherpostedstuff'] = $POST['otherpostedstuff'];
Is this correct? So now the posted "stuff" is saved into specific session variables.
If that is basically a correct way up till now, then here is my main question...
So for example, the field used for prodID and quantity, what happens when the user goes to another product, and decides to order that item also. We follow the same chain of events. They click the "Order this Product" button, come to the order.php page and fill out the form appropriately and submit it by clicking "Add to Cart". At this point they come to the cart.php page where I take the data from the POST array and save each to the SESSION array. But how do I do this without overwriting the data that was already there? This is probably a stupid question and I am either missing something or majorly overthinking it. Do I need to keep some global count variable, and somehow add stuff using it? (that last question probably made no sense) Hopefully someone can see where I am going wrong in the logic and point me in the right direction.
Please advise.
Thanks.
Jonathan