It's not a secret anymore!
The moose likes PHP and the fly likes php shopping cart trouble Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » PHP
Bookmark "php shopping cart trouble" Watch "php shopping cart trouble" New topic

php shopping cart trouble

gong pex
Ranch Hand

Joined: Oct 27, 2011
Posts: 42
Hello everyone,

please go to my site : click here

if you click "BUY NOW" at product on this site twice or more it shown duplicated.

Whereas normally when user click to buy product , it's supposed increase the quantity , and not duplicated.

Q : How to fix this problem?

please someone help me


Note : if you need something please tell me.

Nick Charles
Ranch Hand

Joined: Oct 09, 2011
Posts: 71

Hint: in your code, when someone clicks Buy Now a second time, does your code look to see if that item already appears in the shopping cart and if so just increments the quantity?
It is sorta covered in the JavaRanch Style Guide.
subject: php shopping cart trouble
It's not a secret anymore!