Originally Posted by gavinshaw
you completely missed the point, i understand that, i know what I am doing, I was asking where in the code would I put the shopping cart, you know, like beginning, middle, end,between certain things, or what?
Hang on.. you know what you're doing, you understand everything but you need to ask the question as to where to put your code?
Honestly, you are not a programmer. You do not understand what you are doing and YOU have missed the point. If you knew what you were doing, you wouldn't need to ask.
Seriously, do not continue with your project. If it involves processing payments and is written with nothing but basic code and snippets you've stitched together (just) you're asking for more trouble than you can handle.
If you really believe you have half a clue what you're doing and you have to ask others where to put your php code, the hackers (who actually do really know what they're doing) are going to rip your site to bits.
Also do not even think about storing peoples credit card details in your database. There are very strict financial laws about credit card processing and the storage of data and all sorts of approvals you will need from various financial institutions before you are legally permitted to do so. Sites like paypal and amazon pour $millions into hiring the very best programmers and security experts they can to keep their customers details safe. There is no way you can match their level of expertise or meet the same legal requirements that they have. You can use a payment gateway via an API (paypal, worldpay, 2checkout etc) but you cannot store card details yourself.
Seriously, if you are asking what to do with / where to put your php in your html, you are not skilled enough to be running an ecommerce site. I've been a php programmer for several years and I wouldn't do it myself.